GNOME Bugzilla – Bug 649616
allow widgets to require monospace font
Last modified: 2014-10-19 23:41:08 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.
We've added a GtkTextView:monospace property and a .monospace style class.