diff options
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r-- | pango/pangofc-fontmap.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 7ea5dc52..aada1909 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -962,12 +962,20 @@ pango_fc_is_supported_font_format (FcPattern* pattern) { FcResult res; const char *fontformat; + const char *file; + + /* Harfbuzz loads woff fonts, but we don't get any glyphs */ + res = FcPatternGetString (pattern, FC_FILE, 0, (FcChar8 **)(void*)&file); + if (res == FcResultMatch && + (g_str_has_suffix (file, ".woff") || + g_str_has_suffix (file, ".woff2"))) + return FALSE; res = FcPatternGetString (pattern, FC_FONTFORMAT, 0, (FcChar8 **)(void*)&fontformat); if (res != FcResultMatch) return FALSE; - /* harfbuzz supports only SFNT fonts. */ + /* Harfbuzz supports only SFNT fonts. */ /* FIXME: "CFF" is used for both CFF in OpenType and bare CFF files, but * HarfBuzz does not support the later and FontConfig does not seem * to have a way to tell them apart. |