From what I saw and understand, -fx-font-smoothing-type: gray; is indeed a better default.
I think this is a topic worth to discuss.

-- Marius

Am 27.07.2026 um 20:23 schrieb Christopher Schnick:
    I think most devs do not see this as a large issue as you have the
    ability to fix it with the property (or also -fx-font-smoothing-type:
    gray in css) You are right, the default font rendering settings are not
    the best, but JavaFX is not really

I think most devs do not see this as a large issue as you have the
ability to fix it with the property (or also -fx-font-smoothing-type:
gray in css)

You are right, the default font rendering settings are not the best, but
JavaFX is not really known for having optimal default settings out of
the box in general. If you want to get something good out of it, you
have to do some work.

I can submit a PR to change the defaults, no idea whether that will be
accepted though.

On 21/07/2026 18:31, Glavo wrote:
Hey, does anyone care about this?

On Wed, Jun 3, 2026 at 12:31 PM Glavo <[email protected]> wrote:

Hi everyone,

We have noticed that, for JavaFX applications on Windows HiDPI displays,
subpixel antialiasing often produces very poor rendering results for many
fonts.

For example, when using the MiSans font on a display scaled to 150%, the
edges of English letters rendered with subpixel antialiasing show very
noticeable jagged artifacts:

https://imgur.com/ZpzDWZ5


For Chinese text, the results of subpixel antialiasing are even more
disastrous. Many strokes either blur together or show obvious
inconsistencies in thickness, making the text look very poor.

To address this issue, we tried forcing grayscale font antialiasing by
adding -Dprism.lcdtext=false. After testing many fonts, we found that on
HiDPI displays, grayscale antialiasing is never worse than subpixel
antialiasing, and it fixes rendering issues for many fonts. On non-HiDPI
displays, that is, at 100% scaling, grayscale antialiasing and subpixel
antialiasing each have their own advantages and disadvantages.

We then added a workaround in our application: on Windows, if the primary
screen scale is greater than 100%, the application automatically adds the
JVM option -Dprism.lcdtext=false to enable grayscale antialiasing. After a
year of real-world use, we have not received any user complaints about this
strategy.

I hope JavaFX can provide a built-in mechanism for automatically selecting
the appropriate antialiasing algorithm, so that users do not have to adjust
these options manually.

Glavo

References

    Visible links:

    Hidden links:
    2. 
https://us-phishalarm-ewt.proofpoint.com/EWT/v1/ACWV5N9M2RV99hQ!N_27VmluMChEtbPqF3n0OJaftfpglPBNZejHqzzeFb1qS8N4hxQV99OhWoOMiGeeVh8EC5YpXT4UkOvvvJnbNWukdBqco00DuJbtzA$

Reply via email to