Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text in FoldableStyledArea or GenericStyledArea looks blurry #1046

Closed
jzlhll opened this issue Nov 5, 2021 · 4 comments
Closed

Text in FoldableStyledArea or GenericStyledArea looks blurry #1046

jzlhll opened this issue Nov 5, 2021 · 4 comments

Comments

@jzlhll
Copy link

jzlhll commented Nov 5, 2021

Hi,

Issues:

Devices:
MacBook Pro (Retina, 15-inch, Mid 2015)
this is retina HD screen, macbook;
another display device monitor DELL P2417H
this is a normal dp screen, link it to mac.

When I has the same text shown in area, code likes:
FoldableStyledArea area = new FoldableStyledArea();
VirtualizedScrollPane vpane = new VirtualizedScrollPane<>(area);
//add vpane to root node.
area.replace(xxx)

show on retain screen mac looks good:

looksGood

but dragged the javafx app to second monitor, it will looks blurry and wild colorfu:

looksUrly

Suggest:
javafxports/openjdk-jfx#225
https://stackoverflow.com/questions/23728517/blurred-text-in-javafx-textarea

I've read some pages, tells that maybe a javafx issue for scrollPane, or 'cache' , 'Snap To Pixel' skin etc.
and still not fix on openfx16.

While the GericStyledArea implements Region. Maybe we can fix or has workaround by this project.

Please try it and feedback in free time...
Best wishes.

@Jugen
Copy link
Collaborator

Jugen commented Nov 5, 2021

Could you please try this with the latest version of RichTextFX 0.10.7 and see if it still happens.
I tried on Windows 10 with 150% scaling, JRE 11 as well as 17, and it was crisp.

@jzlhll
Copy link
Author

jzlhll commented Nov 5, 2021

I've with richtextFX 0.10.7 already, JDK is 16.0.1, openfx 16.

Maybe you could try it on retina mac os; and link another monitor.
Drag to main mac to the monitor.

I think it maybe javafx default issue. I'am seeking for a workaound.
Still I want to report to openjfx.
Because the other control or label, editText is same with this issue

@jzlhll jzlhll closed this as completed Nov 9, 2021
@jzlhll
Copy link
Author

jzlhll commented Nov 9, 2021

I will try it and feed back.

@jzlhll
Copy link
Author

jzlhll commented Nov 16, 2021

Finally, i figure it out.
Two ways to fix it:

define two config: boolean hd1, hd2.
1.
if (hd1) { //normal
scene = new Scene(rootView, info.width, info.height);
//scene = new Scene(rootView);
} else { // close antialias
scene = new Scene(rootView, info.width, info.height, true, SceneAntialiasing.BALANCED);
}

  1. if (!hd2)) { // close lcd
    System.setProperty("prism.lcdtext", "false");
    //System.setProperty("prism.subpixeltext", "false");
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants