summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-06-10 09:40:10 +0000
committertavmjong-free <tavmjong@free.fr>2014-06-10 09:40:10 +0000
commit3252b41582b781c90648c0ad892f45751377b57c (patch)
tree81946855fafd52cc39e32c5013259857813e05ad /src/libnrtype
parentfix a bug on spirolive close path (diff)
downloadinkscape-3252b41582b781c90648c0ad892f45751377b57c.tar.gz
inkscape-3252b41582b781c90648c0ad892f45751377b57c.zip
Proper quoting of CSS 'font-family' fallback lists.
(bzr r13341.1.56)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/font-lister.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index 9ff4fad05..43c3045b1 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -601,8 +601,15 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
Glib::ustring family = ui.first;
- sp_repr_css_set_property (css, "-inkscape-font-specification", fontspec.c_str() );
- sp_repr_css_set_property (css, "font-family", family.c_str() ); //Canonized w/ spaces
+
+ // Font spec is single quoted... for the moment
+ Glib::ustring fontspec_quoted( fontspec );
+ css_quote( fontspec_quoted );
+ sp_repr_css_set_property (css, "-inkscape-font-specification", fontspec_quoted.c_str() );
+
+ // Font families needs to be properly quoted in CSS (used unquoted in font-lister)
+ css_font_family_quote( family );
+ sp_repr_css_set_property (css, "font-family", family.c_str() );
PangoFontDescription *desc = pango_font_description_from_string( fontspec.c_str() );
PangoWeight weight = pango_font_description_get_weight( desc );