https://bugs.kde.org/show_bug.cgi?id=524220

            Bug ID: 524220
           Summary: kde-gtk-config writes incorrect Pango font description
                    for Semibold fonts
    Classification: Applications
           Product: systemsettings
      Version First 6.7.4
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: kcm_style
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Selecting MiSans VF Semibold 12 in KDE System Settings causes kde-gtk-config to
write:

gtk-font-name=MiSans VF, Demi Bold 12

Pango parses this as family MiSans VF,Demi with weight 700, instead of family
MiSans VF with a Semibold weight.

STEPS TO REPRODUCE

Set the general font in System Settings → Fonts to MiSans VF, style Semibold,
size 12.
Apply the setting.
Check ~/.config/gtk-3.0/settings.ini or ~/.config/gtk-4.0/settings.ini.
Parse the generated value with Pango.FontDescription.from_string().

OBSERVED RESULT

KDE stores the font as:

MiSans VF,12,-1,5,630,0,0,0,0,0,0,0,0,0,0,1,Semibold,0,0

but GTK configuration contains:

gtk-font-name=MiSans VF, Demi Bold 12

Pango parses it as:

family: MiSans VF,Demi
weight: 700

EXPECTED RESULT

The generated GTK font description should preserve the selected MiSans VF
family and Semibold weight.

For example, Pango correctly parses:

MiSans VF Semi-Bold 12

as:

family: MiSans VF
weight: 600

SOFTWARE/OS VERSIONS

Operating System: CachyOS Linux
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 7.1.8-1-cachyos (64-bit)
Graphics Platform: Wayland
Locale: zh_CN.UTF-8

ADDITIONAL INFORMATION

The same incorrect gtk-font-name value is written to both GTK3 and GTK4
settings.ini files.

Related bugs: 333146, 398768, 487714.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to