GNOME Bugzilla – Bug 688288
Font setting is not picked up
Last modified: 2020-03-02 14:49:49 UTC
Currently, the default font-face for the shell theme is set in the CSS for the theme with the current rule: """ /* default text style */ stage { font-family: cantarell, sans-serif; font-size: 11pt; color: white; } """ However, if a font other than cantarell is chosen for the default font in tweak-tool, cantarell still persists in the shell because of the CSS override. is there anyway to set the default sans-serif font for the shell renderer to be whatever is set as the default? Then the hard-coded cantarell could be removed from the default theme
That's chosen by font-config. I'm not sure how easy it is to hook up to the desktop-font GSetting, considering it has abilities like size and weight: things we typically want to control from the theme ourselves.
*** Bug 706016 has been marked as a duplicate of this bug. ***
*** Bug 706251 has been marked as a duplicate of this bug. ***
Hi! I'm willing to work on a fix for this and came up with two ideas: It would be possible to just use sans-serif (set it Cantarell) and let that be changeable via the gnome-tweak-tool. Another alternative would be to use a different alias like "gnome-shell-font-overwrite". This would be unset by default (so that the theme font / Cantarell is used), but could be set by gnome-tweak-tool. What do you think?
For simplicity sake (and not adding another option), i'd initally choose #1, however i think #2 is the way it should be done. in tweak tool, you can currently set the font face itself, the size, and the style/weighting. However sizes / styles for gnome shell are all done in the CSS, and we just want to set the font-face essentially here, so my +1 is for adding another item/setting for picking the gnome-shell font. One other issue to think about here too is that if a user does set a font that does to override the font in the CSS, any change in the tweak tool will not apply to the gnome-shell theme. Maybe we could recognise this and disable this option if the theme sets something other than sans-serif?
Hm ... what is the long goal for GNOME Shell themes btw? Because right now it isn't possible to set a font from Gtk themes, but from Shell themes. And I think most people want to have the same font for Gtk and the Shell, so I would say it might be a good idea to ignore the font-family option in Shell themes completely and simplify the GNOME Tweak font settings to sans-serif <- GNOME Shell, Gtk Widgets, ... serif <- Default font for web sites monospace <- Terminal and editor font
*** Bug 781858 has been marked as a duplicate of this bug. ***
Downstream bug: https://bugs.launchpad.net/bugs/1717453
In progress: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/486
Ignore that last comment. gnome-shell!486 does not seem to work, at least for font size changes.
Ignoring the size was intentional, see the discussion on that MR.