Bad character spacing (kerning?) in Linux
openjfx at arne-augenstein.de
Wed Mar 7 21:14:44 UTC 2018
Ok, it went faster than expected. I can confirm that missing subpixel
rendering was the issue.
Archlinux has some alternative freetype packages which provide
Cleartype rendering. I found one that works on my machine and now the
text is rendered correctly.
Thanks a lot. I've searched for a solution to this behaviour for quite
a couple of days and you provided me with the correct answer within an
For reference (if someone else has the same problem): I've installed
the package freetype2-ultimate5 from the AUR repository.
freetype2-cleartype would've probably been the better choice as it is
advised to use this one in the wiki article from my previous mail. But
that package currently doesn't compile on my PC.
On Mi, Mär 7, 2018 at 9:20 PM, Arne Augenstein
<openjfx at arne-augenstein.de> wrote:
> Thanks Phil, I think you've put me on the right track. I'm using
> Manjaro, which is a very close derivative of Archlinux. Looking at
> it seems this really could be the underlying problem. Subpixel
> rendering is disabled by default on Archlinux systems.
> I probably will need a few days to verify that this is in fact the
> issue. I will report back as soon as I've found out more.
> On Mi, Mär 7, 2018 at 6:10 PM, Phil Race <philip.race at oracle.com>
>> 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
>> unhinted glyphs
>> with floating point accumulation of the positions.
>> But the raster problem is that you need to align the glyph to
>> discrete pixels
>> In the subpixel case you have 3x the resolution to play with and the
>> rounding to
>> 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
>>> Thanks in advance and regards
>>> Arne Augenstein
More information about the openjfx-dev