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 649616 - allow widgets to require monospace font
allow widgets to require monospace font
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
2.99.x
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-05-06 22:49 UTC by Christian Persch
Modified: 2014-10-19 23:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Persch 2011-05-06 22:49:29 UTC
I'm currently porting VteTerminal to gtk3 themeing, and want to make the font setting themeable through the ordinary theming.

The problem is that the "font" style property will always be set at SETTINGS priority from xsettings and thus be a non-monospaced font.

I tried to use separate style class "terminal" on the widget and with provided default css ".terminal { font: Monospace 10;}" but that only works if provided that at priority > SETTINGS, which make it not themeable. (Default css should really be at FALLBACK priority.)

Discussing this on IRC, the idea was that the best solution to this would be
to add an an xsetting for the default monospace font (translated by g-s-d from  org.gnome.desktop.interface schema.monospace-font-name) that gtk then picks up, and to add a way for to specify via css that a widget wants that monospace font.
Comment 1 Matthias Clasen 2014-10-19 23:41:08 UTC
We've added a GtkTextView:monospace property and a .monospace style class.