[pango/unsupported-formats: 50/51] 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: 50/51] fc: Don't list fonts with unsupported formats
- Date: Sat, 3 Aug 2019 21:50:30 +0000 (UTC)
commit adb199cb29dccb1913b9a1b9c25a2043a492457c
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 d8c7f227..43ab7dbc 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]