freetype-envision icon indicating copy to clipboard operation
freetype-envision copied to clipboard

KDE Plasma sometimes ignores the fontconfig rules

Open maximilionus opened this issue 7 months ago • 3 comments

About

By default, vanilla KDE Plasma desktop environment does follow the fontconfig rules, including the anti-aliasing settings, but in some cases this behavior gets overwritten, presumably by above-level distro specific configurations.

This was discovered during #11.

The great example for such issue is KDE Plasma on Fedora KDE spin, which uses the subpixel font anti-aliasing by default and does completely ignore any fontconfig rules that modify this setting, keeping the sub-pixel method in use until user manually changes it.

Temporary Solution

Open the System Settings, go to "Appearance & Style" - "Text & Fonts" and ensure that the "Sub-pixel rendering" value is set to "None".

Image

maximilionus avatar Apr 13 '25 21:04 maximilionus

AFAIK, this happens only in Fedora-based distros. One can just delete Fedora downstream config (works on immutable distros as well)

sudo rm /etc/fonts/conf.d/10-sub-pixel-rgb-for-kde.conf

KDE bug report: https://bugs.kde.org/show_bug.cgi?id=482547

P.S. Also, I see on the screenshot that bold font is rendered as heavy. It's an issue with variable fonts (Fedora uses variable version of Noto Sans). As a workaround, apply env. variable QT_NO_SYNTHESIZED_BOLD=1 More details can be found at:

  • https://bugzilla.redhat.com/show_bug.cgi?id=2179854
  • https://bugreports.qt.io/browse/QTBUG-112136
  • https://pagure.io/fedora-kde/SIG/issue/461

xalt7x avatar Apr 22 '25 19:04 xalt7x

@xalt7x thanks for such a detailed report.

Anti-aliasing preferences

Booted up KDE on new Fedora 42 to to test the changes and it actually applied the fontconfig rules correctly this time, like it should do, even with still existing /etc/fonts/conf.d/10-sub-pixel-rgb-for-kde.conf. The grayscale anti-aliasing was automatically detected and applied by environment, so I guess there was some kind of regression on Plasma side.

The reason i said like it should do is because all my fontconfig rules are applied with increased priority, that overwrites all the rules before them, including the Fedora's 10-sub-pixel-rgb-for-kde.conf.

Would be really great if you could report if it's really fixed on 42.

Heavy instead of Bold

Yep, that is absolutely correct and I had no idea this was not how it is intended to be, hahaha. A very great find, going to be included in next release of this project.

maximilionus avatar Apr 23 '25 13:04 maximilionus

Some info I found out recently:

If fractional scale is enabled on KDE Plasma, the plasma shell will enable subpixel hinting. https://bugs.kde.org/show_bug.cgi?id=501715

It seems the KDE apps won't do this, but the plasma shell does.

alexjp avatar Oct 27 '25 00:10 alexjp