freetype-envision
freetype-envision copied to clipboard
KDE Plasma sometimes ignores the fontconfig rules
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".
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 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.
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.