Bug 482547

Summary: Improve parsing of distro custom fontconfig (Sub-pixel RGB on Fedora KDE)
Product: [Applications] systemsettings Reporter: Yevhen Popok <xalt7x.service>
Component: kcm_fontsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate
Priority: NOR Keywords: qt6
Version First Reported In: 6.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Yevhen Popok 2024-03-06 15:36:28 UTC
SUMMARY
Fedora by default has Sub-pixel RGB disabled by default (no symlink to /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf in /etc/fonts/conf.d/) . Instead, Fedora KDE spin ships special fontconfig which enables it (https://pagure.io/fedora-kde/kde-settings/blob/f39/f/etc/fonts/conf.d/10-sub-pixel-rgb-for-kde.conf)
  <match target="font">
    <test name="desktop" compare="contains">
      <string>KDE</string>
    </test>
    <edit name="rgba" mode="append"><const>rgb</const></edit>
  </match>

I can confirm that it works not only visually but also using the command below:
fc-match --verbose | grep 'rgba\|desktop'

However, on System Settings "Sub-pixel rendering" value shows as unset/"None" by default.


STEPS TO REPRODUCE
1. Delete original /etc/fonts/conf.d/10-sub-pixel-rgb.conf and create Fedora's config (link above)
2. Create new user and login with its account
3. Check "System Settings" > "Appearance & Style" > "Text & Fonts" > "Fonts" > "Sub-pixel rendering"

OBSERVED RESULT
Value for "Sub-pixel rendering" is "None"

EXPECTED RESULT
Value for "Sub-pixel rendering" is "RGB"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Fedora 40 Kinoite
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
It looks like kcm_fonts targets specifically original "10-sub-pixel-rgb.conf". I wasn't able to tweak Fedora's fontconfig so that kcm_fonts returns the correct value.
Comment 1 Nate Graham 2024-06-14 15:11:03 UTC
Migrating "reproducible" keyword to "CONFIRMED" status.