From f0b0773ecf0249c576e58059864f3a0ecbac64ec Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Fri, 30 May 2014 15:38:31 +0200 Subject: Unquote names in 'font-family' lists. Partial fix for #1029080 (bzr r13341.1.42) --- src/style-internal.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index b15892128..8b4f3c1cd 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -648,9 +648,6 @@ SPIString::read( gchar const *str ) { if( !str ) return; - // libcroco puts quotes around some strings... remove - gchar *str_unquoted = attribute_unquote(str); - if (!strcmp(str, "inherit")) { set = true; inherit = true; @@ -658,10 +655,18 @@ SPIString::read( gchar const *str ) { } else { set = true; inherit = false; - value = g_strdup(str_unquoted); - } - g_free( str_unquoted ); + // libcroco puts quotes around some strings... remove + Glib::ustring str_unquoted(str); + css_unquote( str_unquoted ); + + // Unquote individual family names, Pango always uses unquoted names. + if( name.compare( "font-family" ) == 0 ) { + css_font_family_unquote( str_unquoted ); + } + + value = g_strdup(str_unquoted.c_str()); + } } -- cgit v1.2.3