Summary: | GTK don't follow global font configuration | ||
---|---|---|---|
Product: | [I don't know] kde | Reporter: | David <david.cortes.rivera> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | VERIFIED DOWNSTREAM | ||
Severity: | normal | CC: | luca.bacci, nate, peter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
David
2023-01-25 20:01:02 UTC
I have this same problem. Linux: Arch (In reply to David from comment #0) > SUMMARY > After the last update of plasma/frameworks/qt/don't know what else, GTK apps > no longer use the fonts that I have configured in the system settings. > > STEPS TO REPRODUCE > 1. Go to System Settings -> Appearance -> Global Theme -> Fonts -> Adjust > All Fonts, and set some non-default font like "Noto-Sans" to be used for > everything. > 2. Update KDE-related packages to the latest version. > 3. Open some GTK app. > > OBSERVED RESULT > GTK apps now use a different font family than the one I have configured in > my system (don't know which one exactly, but looks different from QT apps > and from how they used to look before the last update). > > EXPECTED RESULT > Fonts in GTK apps should follow the settings that I have configuted for them. > > SOFTWARE/OS VERSIONS > Operating System: Debian GNU/Linux > KDE Plasma Version: 5.26.5 > KDE Frameworks Version: 5.101.0 > Qt Version: 5.15.8 > Kernel Version: 5.18.0-4-amd64 (64-bit) > Graphics Platform: X11 > Processors: 16 × AMD Ryzen 7 2700 Eight-Core Processor > Memory: 15.5 GiB of RAM > Graphics Processor: AMD Radeon RX Vega > Manufacturer: Acer > Product Name: Predator PH517-61 > System Version: V1.09 > > ADDITIONAL INFORMATION I found resolve our problem on this site "https://bugs.kde.org/show_bug.cgi?id=466463". When you remove this package "xsettingsd", font-s will be display OK. (In reply to glewik from comment #2) > (In reply to David from comment #0) > > SUMMARY > > After the last update of plasma/frameworks/qt/don't know what else, GTK apps > > no longer use the fonts that I have configured in the system settings. > > > > STEPS TO REPRODUCE > > 1. Go to System Settings -> Appearance -> Global Theme -> Fonts -> Adjust > > All Fonts, and set some non-default font like "Noto-Sans" to be used for > > everything. > > 2. Update KDE-related packages to the latest version. > > 3. Open some GTK app. > > > > OBSERVED RESULT > > GTK apps now use a different font family than the one I have configured in > > my system (don't know which one exactly, but looks different from QT apps > > and from how they used to look before the last update). > > > > EXPECTED RESULT > > Fonts in GTK apps should follow the settings that I have configuted for them. > > > > SOFTWARE/OS VERSIONS > > Operating System: Debian GNU/Linux > > KDE Plasma Version: 5.26.5 > > KDE Frameworks Version: 5.101.0 > > Qt Version: 5.15.8 > > Kernel Version: 5.18.0-4-amd64 (64-bit) > > Graphics Platform: X11 > > Processors: 16 × AMD Ryzen 7 2700 Eight-Core Processor > > Memory: 15.5 GiB of RAM > > Graphics Processor: AMD Radeon RX Vega > > Manufacturer: Acer > > Product Name: Predator PH517-61 > > System Version: V1.09 > > > > ADDITIONAL INFORMATION > > I found resolve our problem on this site > "https://bugs.kde.org/show_bug.cgi?id=466463". When you remove this package > "xsettingsd", font-s will be display OK. Removing "xsettingsd" didn't work for me. Don't remove xsettings; kde-gtk-config uses it to configure GTK settings. David, in System Settings > Startup and Shutdown > Background Services, is "GNOME/GTK Settings Synchronization service" running? Can you paste the output of running `cat ~/.config/gtk-*.0/settings.ini` in a terminal window? (In reply to Nate Graham from comment #4) > Don't remove xsettings; kde-gtk-config uses it to configure GTK settings. > > David, in System Settings > Startup and Shutdown > Background Services, is > "GNOME/GTK Settings Synchronization service" running? > > Can you paste the output of running `cat ~/.config/gtk-*.0/settings.ini` in > a terminal window? The service shows as "Running". Output from settings.ini is as follows: [Settings] gtk-application-prefer-dark-theme=true gtk-button-images=true gtk-cursor-theme-name=Adwaita gtk-cursor-theme-size=24 gtk-decoration-layout=icon:minimize,maximize,close gtk-enable-animations=true gtk-font-name=Noto Sans, 11 gtk-icon-theme-name=breeze-dark gtk-menu-images=true gtk-modules=colorreload-gtk-module:window-decorations-gtk-module gtk-primary-button-warps-slider=false gtk-theme-name=Materia-Breeze-gtk gtk-toolbar-style=3 gtk-xft-dpi=98304 [Settings] gtk-application-prefer-dark-theme=true gtk-cursor-theme-name=Adwaita gtk-cursor-theme-size=24 gtk-decoration-layout=icon:minimize,maximize,close gtk-enable-animations=true gtk-font-name=Noto Sans, 11 gtk-icon-theme-name=breeze-dark gtk-modules=colorreload-gtk-module:window-decorations-gtk-module gtk-primary-button-warps-slider=false gtk-theme-name=Materia-Breeze-gtk gtk-xft-dpi=98304 It looks like the GTK config files are correct. Which GTK apps specifically are not respecting these settings? Can you also try with Inkscape and GIMP? Do they respect the settings? (In reply to Nate Graham from comment #6) > It looks like the GTK config files are correct. Which GTK apps specifically > are not respecting these settings? Can you also try with Inkscape and GIMP? > Do they respect the settings? Apps that show different fonts: - Evolution - GEdit - Sublime - VScode - Vivaldi However, they don't show different fonts everywhere - for example, the menus in application bars show the fonts that I have configured, while the emails in evolution use other fonts. Same in Vivaldi - the tab names don't use my configured fonts, while other things do. It's particularly noticeable in apps like gedit or sublime (text editors), since it applies to text in the files that they open. And if you use "Noto Sans" in KDE, you can check the lowercase R letters in those apps for a starker contrast. See the picture here for example: https://github.com/microsoft/vscode-jupyter/issues/13012 I tried playing a bit with inkscape but I don't know what the app does or how to use it. As far as I could tell, the menus and the welcome page were using my configured fonts, but don't know where else it's supposed to show text. Note that VSCode isn't a GTK app; it's an electron app. Sublime has its own font/text configuration facilities. Vivaldi I'm not 100% sure about but I am pretty sure it's not a pure GTK app either. And web browsers in general often have their own in-app font/text configuration facilities. So the only apps in that list that I would *expect* to be respecting the font specified in the GTK files are Gedit and Evolution. Since it looks like your config files are set up properly, it seems like this may be an issue in those apps, or in GTK, or in how things are packaged on your machine. It looks to me like the relevant KDE code is doing its part so at this point I'd recommend asking for help in a Debian-specific forum. (In reply to Nate Graham from comment #8) > Note that VSCode isn't a GTK app; it's an electron app. Sublime has its own > font/text configuration facilities. Vivaldi I'm not 100% sure about but I am > pretty sure it's not a pure GTK app either. And web browsers in general > often have their own in-app font/text configuration facilities. > > So the only apps in that list that I would *expect* to be respecting the > font specified in the GTK files are Gedit and Evolution. Since it looks like > your config files are set up properly, it seems like this may be an issue in > those apps, or in GTK, or in how things are packaged on your machine. It > looks to me like the relevant KDE code is doing its part so at this point > I'd recommend asking for help in a Debian-specific forum. These apps were all following the KDE font config as of debian sid of 2 months ago. I think the only large things that updated during that period were KDE things like frameworks. Downgrading the software in question to previous versions doesn't solve the issue. Hmm, that's an interesting data point. Any ideas, Luca? Could this be related to any of the recent kde-gtk-config changes made for 5.27? Hello! It's possible to specify the desired font for generic widgets, document content (e.g textviews) or momospace content (e.g sourceview for viewing source code, or vote for terminals) See for example: https://gitlab.gnome.org/GNOME/gnome-tweaks/-/blob/40.0/gtweak/tweaks/tweak_group_font.py#L109 Could you report the output of: 1. gsettings get org.gnome.desktop.interface font-name 2. gsettings get org.gnome.desktop.interface document-font-name 3. gsettings get org.gnome.desktop.interface monospace-font-name" 2 or 3 should be different. In that case you can set them to Noto 11 that way: * gsettings set org.gnome.desktop.interface document-font-name "Noto 11" I'll have a look at how kde-gtk-config handles that! (In reply to Luca Bacci from comment #11) > Hello! It's possible to specify the desired font for generic widgets, > document content (e.g textviews) or momospace content (e.g sourceview for > viewing source code, or vote for terminals) > > See for example: > https://gitlab.gnome.org/GNOME/gnome-tweaks/-/blob/40.0/gtweak/tweaks/ > tweak_group_font.py#L109 > > Could you report the output of: > > 1. gsettings get org.gnome.desktop.interface font-name > 2. gsettings get org.gnome.desktop.interface document-font-name > 3. gsettings get org.gnome.desktop.interface monospace-font-name" > > 2 or 3 should be different. In that case you can set them to Noto 11 that > way: > > * gsettings set org.gnome.desktop.interface document-font-name "Noto 11" > > I'll have a look at how kde-gtk-config handles that! Thanks. So this is what the commands output: david@debian:~$ gsettings get org.gnome.desktop.interface font-name 'Cantarell 11' david@debian:~$ gsettings get org.gnome.desktop.interface document-font-name 'Cantarell 11' david@debian:~$ gsettings get org.gnome.desktop.interface monospace-font-name 'Monospace 11' So then I executed the following: gsettings set org.gnome.desktop.interface font-name "Noto 11" gsettings set org.gnome.desktop.interface document-font-name "Noto 11" gsettings set org.gnome.desktop.interface monospace-font-name "Noto 11" And restarted the computer. Then, I get: david@debian:~$ gsettings get org.gnome.desktop.interface font-name 'Noto 11' david@debian:~$ gsettings get org.gnome.desktop.interface document-font-name 'Noto 11' david@debian:~$ gsettings get org.gnome.desktop.interface monospace-font-name 'Noto 11' BUT all these GTK apps **still** use the same fonts as before (**not** Noto Sans 11). I also tried with variations: Noto / Noto Sans / Noto Sans Regular comma / no comma one space / two spaces But none of that seemed to have any effect. By the way, changing the fonts in gnome-tweaks did have an effect on some of these apps like "evolution", but not on Vivaldi or VScode. Thanks, David! I'm doing some research on this issue, will let you know P.S: Regarding kde-gtk-config, there's room for improvement nonetheless. I believe that we should set 'document-font-name' the same as we set 'font-name', and set 'monospace-font-name' according to the 'Fixed Width' font setting in Appearance > Fonts: https://userbase.kde.org/System_Settings/Font Hi David! I can't reproduce. I have updated my Arch Linux system today and rebooted. Vivaldi, Chromium and VSCode all use the font set in KDE System Settings for generic parts of their UI (Menu, Dialogs, Window Chrome / Decorations, Tooltips, etc.), just as with KDE 5.27.2. Regarding the code editor in VSCode, you can customize the font at your liking by going in File > Preferences > Settings > Text Editor > Font. Note that VSCode uses "Droid Sans Mono" if available, but otherwise requests the generic family "Monospace", meaning that the actual font that will be loaded depends on the font mapping process inside FontConfig. The mapping can change at any time by updating FontConfig, changing its configuration, installing new font packages or even updating already-installed font packages! At any of such changes FontConfig may choose to use a font that is different from the one that it used to load before. (In reply to Luca Bacci from comment #15) > Hi David! > > I can't reproduce. I have updated my Arch Linux system today and rebooted. > Vivaldi, Chromium and VSCode all use the font set in KDE System Settings for > generic parts of their UI (Menu, Dialogs, Window Chrome / Decorations, > Tooltips, etc.), just as with KDE 5.27.2. > > Regarding the code editor in VSCode, you can customize the font at your > liking by going in File > Preferences > Settings > Text Editor > Font. Note > that VSCode uses "Droid Sans Mono" if available, but otherwise requests the > generic family "Monospace", meaning that the actual font that will be loaded > depends on the font mapping process inside FontConfig. The mapping can > change at any time by updating FontConfig, changing its configuration, > installing new font packages or even updating already-installed font > packages! At any of such changes FontConfig may choose to use a font that is > different from the one that it used to load before. Thanks for looking into this. Any chance that you could try on current debian sid / debian 12 alpha installer, with a more affected app like 'gedit' or 'evolution'? (these btw. respond to changes through gnome tweaks, but not through the KDE config, nor the CLI commands). By the way, in the case of vscode, even if you configure a non-default font, there are still parts of the interface which use the default GTK font, which up to a few months ago (in debian at least) would have corresponded with the KDE configuration. See the picture here for an example where the two configurations produce a visual mismatch in vscode: https://github.com/microsoft/vscode-jupyter/issues/13012 > By the way, in the case of vscode, even if you configure a non-default font, there are still parts of the interface which use the default GTK font, which up to a few months ago (in debian at least) would have corresponded with the KDE configuration.
Indeed, that should work! (and does work, here)
Can you check if XSettingsd and / or KDED are running? Open a terminal and post the output of:
ps aux | grep -Ei 'xsettingsd|kded'
Thanks!
Luca
(In reply to Luca Bacci from comment #17) > > By the way, in the case of vscode, even if you configure a non-default font, there are still parts of the interface which use the default GTK font, which up to a few months ago (in debian at least) would have corresponded with the KDE configuration. > > Indeed, that should work! (and does work, here) > > Can you check if XSettingsd and / or KDED are running? Open a terminal and > post the output of: > > ps aux | grep -Ei 'xsettingsd|kded' > > Thanks! > Luca Looks like they are both running, but the later is called "kded5": david@debian:~$ ps aux | grep -Ei 'xsettingsd|kded' david 1599 0.1 0.2 3388344 144436 ? Ssl 16:48 0:11 /usr/bin/kded5 david 1673 0.0 0.0 9496 4044 ? S 16:48 0:00 /usr/bin/xsettingsd david 33820 0.0 0.0 6464 2172 pts/2 S+ 19:36 0:00 grep -Ei xsettingsd|kded |