Created attachment 126227 [details] Screenshot SUMMARY Plasma -> GTK font synchronization ignores font family variant. STEPS TO REPRODUCE 1. Set "General" font to a non-default font family variant, e.g. "Noto SemiCondensed" 2. Observe fonts in KDE apps vs GTK apps. OBSERVED RESULT GTK apps use the "regular" font variant instead of the selected "SemiCondensed". EXPECTED RESULT GTK apps observe the selected fonts exactly. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Gentoo Linux KDE Plasma Version: 5.18.0 KDE Frameworks Version: 5.67.0 Qt Version: 5.13.2
FWIW, adding this: <fontconfig> <alias> <family>sans-serif</family> <prefer> <family>Noto Sans SemiCondensed</family> </prefer> </alias> </fontconfig> to fonts.conf helps.
Is your system in English, or another language? If it's not English, you're probably running into Bug 333146.
What is your contents of ~/.config/gtk-3.0/settings.ini file?
$ locale LANG=en_CA.UTF-8 LC_CTYPE="en_CA.UTF-8" LC_NUMERIC="en_CA.UTF-8" LC_TIME="en_CA.UTF-8" LC_COLLATE=C LC_MONETARY="en_CA.UTF-8" LC_MESSAGES="en_CA.UTF-8" LC_PAPER="en_CA.UTF-8" LC_NAME="en_CA.UTF-8" LC_ADDRESS="en_CA.UTF-8" LC_TELEPHONE="en_CA.UTF-8" LC_MEASUREMENT="en_CA.UTF-8" LC_IDENTIFICATION="en_CA.UTF-8" $ cat .config/gtk-3.0/settings.ini [Settings] gtk-application-prefer-dark-theme=1 gtk-button-images=1 gtk-cursor-theme-name=Breeze_Snow gtk-decoration-layout=icon:minimize,maximize,close gtk-enable-animations=1 gtk-fallback-icon-theme=Adwaita gtk-font-name=Noto Sans, SemiCondensed 11 gtk-icon-theme-name=breeze-dark gtk-menu-images=1 gtk-primary-button-warps-slider=0 gtk-theme-name=Breeze-Dark gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
(In reply to Elvis Pranskevichus from comment #4) > $ locale > LANG=en_CA.UTF-8 > LC_CTYPE="en_CA.UTF-8" > LC_NUMERIC="en_CA.UTF-8" > LC_TIME="en_CA.UTF-8" > LC_COLLATE=C > LC_MONETARY="en_CA.UTF-8" > LC_MESSAGES="en_CA.UTF-8" > LC_PAPER="en_CA.UTF-8" > LC_NAME="en_CA.UTF-8" > LC_ADDRESS="en_CA.UTF-8" > LC_TELEPHONE="en_CA.UTF-8" > LC_MEASUREMENT="en_CA.UTF-8" > LC_IDENTIFICATION="en_CA.UTF-8" > > $ cat .config/gtk-3.0/settings.ini > [Settings] > gtk-application-prefer-dark-theme=1 > gtk-button-images=1 > gtk-cursor-theme-name=Breeze_Snow > gtk-decoration-layout=icon:minimize,maximize,close > gtk-enable-animations=1 > gtk-fallback-icon-theme=Adwaita > gtk-font-name=Noto Sans, SemiCondensed 11 > gtk-icon-theme-name=breeze-dark > gtk-menu-images=1 > gtk-primary-button-warps-slider=0 > gtk-theme-name=Breeze-Dark > gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ It seems like you selected Noto Sans font family and then selected SemiCondenced style from Fonts KCM. Do you have a font, that has "Noto Sans Semicondenced" as the whole family name?
Yes, there seems to be both a SemiCondensed style, and a font family (which is why the fontconfig hack works, I think).
(In reply to Elvis Pranskevichus from comment #6) > Yes, there seems to be both a SemiCondensed style, and a font family (which > is why the fontconfig hack works, I think). If you select the one, that has SemiCondensed style in family name, will the font match in GTK apps and KDE ones? It should look the same, as the font you've selected before (short family name and the style SemiCondenced).
Selecting Noto Sans SemiCondensed family does not work either. What DOES work, though, is removing all mentions of Noto Sans from fonts.conf (regardless of priority). Given that the selected font is actually reflected properly in .config/gtk-3.0/settings.ini, I assume this is actually a GTK or fontconfig bug, so feel free to close this one.
Same thing here. I use Liberation Sans font, I changed the style of "General" font to italic in Fonts kcm. Now Qt apps use italic fonts as expected but GTK apps use regular Liberation Sans fonts even after relogin. Operating System: Arch Linux KDE Plasma Version: 5.18.2 KDE Frameworks Version: 5.67.0 Qt Version: 5.14.1
This is a known issue that has been traced to a GTK bug. Mikhail, can you add the bug to the URL field once it's been filed? Thanks!
Nice, this is an intentional GTK3 bug-feature https://gitlab.gnome.org/GNOME/gtk/issues/2484#note_727715
Sigh. Maybe we should add an InlineMessage in the KCM that warns you that styled fonts won't show up in GTK apps. :(
The upstream explanation does not explain why selecting a "Condensed" **font-family** doesn't work either until fontconfig rules for "sans-serif" are fiddled with.