Bad character spacing (kerning?) in Linux
philip.race at oracle.com
Wed Mar 7 17:10:49 UTC 2018
The Linux image shows greyscale text.
The Mac image shows subpixel LCD text.
The latter can be positioned with sub-pixel (1/3 pixel) resolution.
Why does this make a difference ?
JavaFX like CoreText + DirectWrite, and unlike GDI + Swing uses
with floating point accumulation of the positions.
But the raster problem is that you need to align the glyph to discrete
In the subpixel case you have 3x the resolution to play with and the
the raster grid is not obvious.
If your linux system were configured to support LCD subpixel text I'd expect
it to be similar to Mac .. modulo the fact that retina is hi-res and
that the fonts will be different.
So it is probably not something FX has control over .. you need to look
at your settings.
If freetype from your vendor is configured without LCD text support you
may be out of luck
On 03/07/2018 08:51 AM, openjfx at arne-augenstein.de wrote:
> Hello all,
> I've recently started a project in JavaFX and had some trouble with
> inconsistent widths of spaces between characters in Linux. I haven't
> been able to find much useful information and therefore posted a
> stackoverflow question with a screenshot illustrating the problem and
> some simple example code to reproduce the issue. I think it's better
> explained with the picture, that's why I won't repeat myself here and
> point you instead to my question on that page:
> One of the members of stackoverflow advised me to ask this question on
> your mailing list. My question is if this behavior is inherent to the
> way JavaFX renders text on Linux. And if there is some
> workaround/setting which I could use to circumvent this issue.
> Thanks in advance and regards
> Arne Augenstein
More information about the openjfx-dev