Помогите, пожалуйста, разобраться со шрифтами.
Дано: Fedora 37, KDE 5.27.4, X11. В Java приложениях некоторые буквы в шрифте липнут друг к другу.
Беглый гуглеж дал такую же проблему на SO. Цитата решения:
It is not a problem of JavaFX but a configuration issue on my Linux system. JavaFX needs subpixel rendering to position the glyphs correctly.
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
Я в шрифтах вообще на шарю, поэтому единственное что уловил из всего этого, что счастье наступит при включении LCD subpixel rendering.
В настройках шрифта KDE такой опции нет.
Попробовал сходить на арчевики и добавить вручную в ~/.config/fontconfig/fonts.conf
<match target="font">
<edit name="lcdfilter" mode="assign">
<const>lcddefault</const>
</edit>
</match>
Также пробовал создать файлик ~/.Xresources
с содержимым:
Xft.lcdfilter: lcddefault
Ни то, ни другое не помогло.
Из freetype удалось вытащить только это:
❯ freetype-config --cflags
-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread
~
❯ freetype-config --version
24.3.18