diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-06-10 09:29:58 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-06-10 09:29:58 +0000 |
| commit | 30add35428dda0b2ba699612148d4627994add79 (patch) | |
| tree | 0c1d423712898fc508d9af3dd25a14e61c232331 /src/libnrtype | |
| parent | Display name of face from font file in Text and Font dialog (as well as CSS/P... (diff) | |
| download | inkscape-30add35428dda0b2ba699612148d4627994add79.tar.gz inkscape-30add35428dda0b2ba699612148d4627994add79.zip | |
Proper quoting of CSS 'font-family' fallback lists.
(bzr r13415)
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/font-lister.cpp | 11 |
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 ); |
