This are screen captures of the same text in JavaFX (lcd and gray font smoothing) and Swing (default) on Windows 7 (Java JDK 8u45):
Both JavaFX and Swing fonts are the same (family: Segoe UI, style: Regular, size: 12).
JavaFX 8 (lcd)
JavaFX 8 (gray)
Swing
Differences are not big, but are noticable.
Note: I don't want to include Swing components in JavaFX.
tl;dr: It's not possible to get the Swing font rendering it via any combination of available JavaFX font knobs. It seems that your only option is to dig into JavaFX sources, fix it and/or bring it to JavaFX mailing list.
Difference on Linux is so big, that it's practically unusable for any kind of GUI where you read text for longer time. I did fair comparison with Swing and reported it twice[1][2]:
It's somewhat better on Windows, but as you say, in fair comparison with Swing, the difference is noticable: https://i.imgur.com/I7wLuYJ.png
Quoting Phillip from second bug report:
The main (only?) reason for the difference is that FX by design and across all platforms (including Windows) renders text unhinted, so as to preserve the shapes.
Note that his comments about unfair comparison are false for both bug reports. In the second report there's the test case I made where I specifically used same colors, fonts and sizes, and made the results for all possible combinations of available knobs.
I did the tests on Fedora 23 with freetype-freeworld from rpmfusion:
Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With