diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-10-15 16:08:19 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-11-19 16:20:01 -0500 |
commit | 73d2c5abd43586291f1c896447123df5c73ac291 (patch) | |
tree | bccd6926559f463100a94bf14eb18d74b4a8f454 /pango/pangofc-fontmap.c | |
parent | 37daf4ea2ade57210264fb24eed8bbea12a64d37 (diff) | |
download | pango-73d2c5abd43586291f1c896447123df5c73ac291.tar.gz |
Skip variable when enumerating faces
The variable face is somewhat special, and we don't want
to confuse things by calling it 'Regular' (since it doesn't
have a style).
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r-- | pango/pangofc-fontmap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 9075535c..7d75f6f9 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -2556,6 +2556,16 @@ pango_fc_family_list_faces (PangoFontFamily *family, if (FcPatternGetInteger(fontset->fonts[i], FC_SLANT, 0, &slant) != FcResultMatch) slant = FC_SLANT_ROMAN; +#ifdef FC_VARIABLE + { + gboolean variable; + if (FcPatternGetBool(fontset->fonts[i], FC_VARIABLE, 0, &variable) != FcResultMatch) + variable = FALSE; + if (variable) /* skip the variable face */ + continue; + } +#endif + if (FcPatternGetString (fontset->fonts[i], FC_STYLE, 0, (FcChar8 **)(void*)&font_style) != FcResultMatch) font_style = NULL; |