summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-10-02 07:44:34 +0000
committertavmjong-free <tavmjong@free.fr>2014-10-02 07:44:34 +0000
commit663e9d9f949a142a094270d97c5ad4fe9ffe86dc (patch)
tree76a1f14cf49c50d6590ef8e36a88311919dd619c /src/libnrtype
parentchange header include order to fix win64 build (diff)
downloadinkscape-663e9d9f949a142a094270d97c5ad4fe9ffe86dc.tar.gz
inkscape-663e9d9f949a142a094270d97c5ad4fe9ffe86dc.zip
Fix style string while searching for best face match.
Fix typo for 'ultra-condensed' face in fontspec_from_style(). (bzr r13341.1.236)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/font-lister.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index c6d7327f6..fad06cd00 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -819,7 +819,7 @@ Glib::ustring FontLister::fontspec_from_style(SPStyle *style)
switch (style->font_stretch.computed) {
case SP_CSS_FONT_STRETCH_ULTRA_CONDENSED:
- fontspec += " extra-condensed";
+ fontspec += " ultra-condensed";
break;
case SP_CSS_FONT_STRETCH_EXTRA_CONDENSED:
@@ -1009,7 +1009,7 @@ Glib::ustring FontLister::get_best_style_match(Glib::ustring family, Glib::ustri
}
GList *styles = row[FontList.styles];
for (GList *l = styles; l; l = l->next) {
- Glib::ustring fontspec = family + ", " + (char *)l->data;
+ Glib::ustring fontspec = family + ", " + ((StyleNames *)l->data)->CssName;
PangoFontDescription *candidate = pango_font_description_from_string(fontspec.c_str());
//font_description_dump( candidate );
//std::cout << " " << font_description_better_match( target, best, candidate ) << std::endl;