diff options
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 9 | ||||
| -rw-r--r-- | src/libnrtype/font-lister.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 0260a9c4b..7844925b7 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -79,7 +79,7 @@ PangoFontDescription* ink_font_description_from_style(SPStyle const *style) { PangoFontDescription *descr = pango_font_description_new(); - pango_font_description_set_family(descr, style->font_family.value); + pango_font_description_set_family(descr, style->font_family.value()); // This duplicates Layout::EnumConversionItem... perhaps we can share code? switch ( style->font_style.computed ) { @@ -572,11 +572,12 @@ font_instance* font_factory::FaceFromStyle(SPStyle const *style) if (style) { // First try to use the font specification if it is set + char const *val; if (style->font_specification.set - && style->font_specification.value - && *style->font_specification.value) { + && (val = style->font_specification.value()) + && val[0]) { - font = FaceFromFontSpecification(style->font_specification.value); + font = FaceFromFontSpecification(val); } // If that failed, try using the CSS information in the style diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp index 30283e624..dcd94d972 100644 --- a/src/libnrtype/font-lister.cpp +++ b/src/libnrtype/font-lister.cpp @@ -542,7 +542,7 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::selection_update() //std::cout << " Attempting selected style" << std::endl; if (result != QUERY_STYLE_NOTHING && query.font_specification.set) { - fontspec = query.font_specification.value; + fontspec = query.font_specification.value(); //std::cout << " fontspec from query :" << fontspec << ":" << std::endl; } |
