[pango/unsupported-formats] fc: Don't list fonts with unsupported formats
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/unsupported-formats] fc: Don't list fonts with unsupported formats
- Date: Tue, 30 Jul 2019 12:53:10 +0000 (UTC)
commit a7f7b81d62b467c8fb2612dcea563fad8e325b23
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 30 08:51:32 2019 -0400
fc: Don't list fonts with unsupported formats
We don't want to list fonts if we can't handle them.
pango/pangofc-fontmap.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 6ac75ef8..f0e3c521 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1337,6 +1337,7 @@ pango_fc_font_map_list_families (PangoFontMap *fontmap,
#ifdef FC_VARIABLE
FC_VARIABLE,
#endif
+ FC_FONTFORMAT,
NULL);
FcPattern *pat = FcPatternCreate ();
GHashTable *temp_family_hash;
@@ -1358,6 +1359,10 @@ pango_fc_font_map_list_families (PangoFontMap *fontmap,
int variable;
PangoFcFamily *temp_family;
+ res = FcPatternGetString (fontset->fonts[i], FC_FONTFORMAT, 0, (FcChar8 **)(void*)&s);
+ if (strcmp (s, "Type 1") == 0 || strcmp (s, "PCF") == 0)
+ continue; /* harfbuzz does not support these */
+
res = FcPatternGetString (fontset->fonts[i], FC_FAMILY, 0, (FcChar8 **)(void*)&s);
g_assert (res == FcResultMatch);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]