After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688288 - Font setting is not picked up
Font setting is not picked up
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
triaged
: 706016 706251 781858 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-11-13 22:29 UTC by Ryan Lerch
Modified: 2020-03-02 14:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ryan Lerch 2012-11-13 22:29:13 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
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-11-13 23:53:58 UTC
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.
Comment 2 Allan Day 2013-08-20 10:44:42 UTC
*** Bug 706016 has been marked as a duplicate of this bug. ***
Comment 3 Allan Day 2013-08-20 10:45:05 UTC
*** Bug 706251 has been marked as a duplicate of this bug. ***
Comment 4 Jan Niklas Hasse (Account disabled) 2016-05-03 21:05:14 UTC
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?
Comment 5 Ryan Lerch 2016-07-22 04:14:31 UTC
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?
Comment 6 Ryan Lerch 2016-07-22 04:14:48 UTC
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?
Comment 7 Jan Niklas Hasse (Account disabled) 2016-07-22 14:12:20 UTC
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
Comment 8 Florian Müllner 2017-04-27 19:02:24 UTC
*** Bug 781858 has been marked as a duplicate of this bug. ***
Comment 9 Daniel van Vugt 2019-04-24 07:24:49 UTC
Downstream bug: https://bugs.launchpad.net/bugs/1717453
Comment 10 Daniel van Vugt 2019-06-17 08:31:04 UTC
In progress: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/486
Comment 11 Daniel van Vugt 2020-03-02 14:34:29 UTC
Ignore that last comment. gnome-shell!486 does not seem to work, at least for font size changes.
Comment 12 Florian Müllner 2020-03-02 14:49:49 UTC
Ignoring the size was intentional, see the discussion on that MR.