summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
Diffstat (limited to 'pango')
-rw-r--r--pango/pangofc-fontmap.c4
-rw-r--r--pango/pangofc-fontmap.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 871b2704..4e7d74bb 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1519,9 +1519,11 @@ pango_fc_make_pattern (const PangoFontDescription *description,
FC_DPI, FcTypeDouble, dpi,
FC_SIZE, FcTypeDouble, pixel_size * (72. / 1024. / dpi),
FC_PIXEL_SIZE, FcTypeDouble, pixel_size / 1024.,
- PANGO_FC_FONT_VARIATIONS, FcTypeString, variations ? variations : "",
NULL);
+ if (variations)
+ FcPatternAddString (pattern, PANGO_FC_FONT_VARIATIONS, (FcChar8*) variations);
+
if (pango_font_description_get_family (description))
{
families = g_strsplit (pango_font_description_get_family (description), ",", -1);
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h
index 63452a83..bff288b6 100644
--- a/pango/pangofc-fontmap.h
+++ b/pango/pangofc-fontmap.h
@@ -319,8 +319,8 @@ PangoFontDescription *pango_fc_font_description_from_pattern (FcPattern *pattern
* String representing a fontconfig property name that Pango reads from font
* patterns to populate list of OpenType font variations to be used for a font.
*
- * The property will have a number of string elements, each of which is the
- * OpenType axis setting of the form AXIS=VALUE.
+ * The property will have a string elements, each of which a comma-separated
+ * list of OpenType axis setting of the form AXIS=VALUE.
*/
#define PANGO_FC_FONT_VARIATIONS "fontvariations"