summaryrefslogtreecommitdiff
path: root/gtk/gtkfontbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-05-08 20:53:44 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-05-08 20:54:50 -0400
commite0ebf4e401528687cd22145ab16a83e2272dd72d (patch)
tree21cb62012dd87b606bbf14a8076893598c977c15 /gtk/gtkfontbutton.c
parenta3f528301802b029b376531d59e222faf7686076 (diff)
downloadgtk+-e0ebf4e401528687cd22145ab16a83e2272dd72d.tar.gz
fontbutton: Quote font family names
Otherwise, spaces in family names will trip up the css parser.
Diffstat (limited to 'gtk/gtkfontbutton.c')
-rw-r--r--gtk/gtkfontbutton.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 091ecbfe19..2e2d136fdc 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -1121,9 +1121,9 @@ pango_font_description_to_css (PangoFontDescription *desc,
set = pango_font_description_get_set_fields (desc);
if (set & PANGO_FONT_MASK_FAMILY)
{
- g_string_append (s, "font-family: ");
+ g_string_append (s, "font-family: \"");
g_string_append (s, pango_font_description_get_family (desc));
- g_string_append (s, "; ");
+ g_string_append (s, "\"; ");
}
if (set & PANGO_FONT_MASK_STYLE)
{