Bad character spacing (kerning) in JavaFX's font rendering (in Linux)

jewelsea advised me to put my question on the openjfx-dex mailing list. The guys over there could explain what's going on:

It is not a problem of JavaFX but a configuration issue on my Linux system. JavaFX needs subpixel rendering to position the glyphs correctly. I'm using Manjaro, which is a derivative of Archlinux. In Archlinux, subpixel rendering is disabled by default, which has to do with patents covered by Microsoft.

In my case the problem could be solved by installing the freetype2-ultimate5 package from AUR, although the in the wiki mentioned freetype2-cleartype package is probably the better choice. But the latter one currently doesn't compile on my system because of another issue.


Adding -Dprism.lcdtext=false might help, at least on Linux it removes the painful off-colour sub-pixel antialiasing attempt by using grayscale instead which is much cleaner.