summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-03-13 13:01:03 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-03-13 13:01:03 +0000
commit1959a42f93795bb73ff957611d54d68b85a0e401 (patch)
treeb38cb031f2d058940b5d78b2f160d948a55f7765 /src/libnrtype
parentRemove duplicate code. (diff)
downloadinkscape-1959a42f93795bb73ff957611d54d68b85a0e401.tar.gz
inkscape-1959a42f93795bb73ff957611d54d68b85a0e401.zip
Work around possible Pango bug where an empty 'variations' generates a '@' in font description string.
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 6a970c789..9b39f9e9b 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -197,7 +197,10 @@ PangoFontDescription* ink_font_description_from_style(SPStyle const *style)
}
#if PANGO_VERSION_CHECK(1,41,1)
- pango_font_description_set_variations(descr, style->font_variation_settings.toString().c_str());
+ // Check if set as Pango will add @ to string even if empty (bug in Pango?).
+ if (style->font_variation_settings.set) {
+ pango_font_description_set_variations(descr, style->font_variation_settings.toString().c_str());
+ }
#endif
return descr;