JavaFX: Entirely turn off scene anti-aliasing (inclusive of control text anti-aliasing)
Asked Answered
C

0

7

Since both System.setProperty("prism.lcdtext", "false") and System.setProperty("prism.lcdtext", "true") are unsatisfactory (the former appears downy whereas the latter appears colorful at the letter edges even though the text color is black; on my LCD it looks even uglier than reported here: https://bugs.openjdk.java.net/browse/JDK-8131923),

I prefer to turn off anti-aliasing entirely.

The setting SceneAntialiasing.DISABLED seems not to affect my buttons/lists/dropdowns/... (I guess it is meant for drawing only).

How can I turn off anti-aliasing completely? I would like to use a font similar to those of Windows 2000 and the first version of Win XP, which work without anti-aliasing (and besides save space because they can be scaled down more than have-to-be-smoothed fonts).

[UPDATE] Screenshot added (as requested)

The right window is generated by my ScalaFX app. Pure plain standard code, no setting applied.

(Playing with System.setProperty("prism.lcdtext", "false") and System.setProperty("prism.text", "t2k") gives me slightly better, but still unsatisfactory results.)

See the enlarged 'W' and its many colors, which stems from the first button in the right window (JavaFX): for demanding users, this is intolerable. And please compare the smoothness of the monospace texts (left: Ubuntu, right: JavaFX).

Comparison: left Ubuntu; right JavaFX

Copenhaver answered 23/3, 2016 at 19:27 Comment(5)
add a minimal sample code & current issue observed(probably a screenshot) to get better answers & attention.Neogene
Which minimal sample code do you need? Please see my question: I am simply asking how I could turn off text anti-aliasing. Please either say "impossible" or post a short answer how anti-aliasing can be turned off. Tomorrow, I will post a screenshot but I guess it will be difficult to make anti-aliasing work correctly. Btw. it is just an ordinary JavaFX app written in ScalaFX.Copenhaver
Can you attach a screenshot ??Neogene
Possibly useful: #24254500Strudel
Unfortunately not, that's why I posted my question with the intent of turning off font-smoothing. I guess the JavaFX world doesn't have font-smoothing under control. It is too difficult for them to handle. Hence turning it off is the only solution to the problem.Copenhaver

© 2022 - 2024 — McMap. All rights reserved.