From 1959a42f93795bb73ff957611d54d68b85a0e401 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 13 Mar 2018 14:01:03 +0100 Subject: Work around possible Pango bug where an empty 'variations' generates a '@' in font description string. --- src/libnrtype/FontFactory.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/libnrtype') 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; -- cgit v1.2.3