Bug 482547 - Improve parsing of distro custom fontconfig (Sub-pixel RGB on Fedora KDE)
Summary: Improve parsing of distro custom fontconfig (Sub-pixel RGB on Fedora KDE)
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fonts (show other bugs)
Version: 6.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-06 15:36 UTC by Yevhen Popok
Modified: 2024-06-14 15:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.