Skip to content

fc: Ignore more unsupported font formats

Khaled Hosny requested to merge ignore-more-unsupported-fonts into master

FontConfig uses FreeType’s FT_Get_X11_Font_Format() to get the font format. From the list of font formats it supports, only “TrueType” and “CFF” are supported by HarfBuzz. We now check explicitly for supported formats and reject anything else: https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/internal/services/svfntfmt.h#n36

FreeType, however, seems to use “CFF” for both OpenType fonts with CFF table (.otf) and bare CFF fonts (.cff), but the later are not supported by HarfBuzz although they rather rare (outside of PDF files, which shouldn’t be rendered with Pango), so it should be OK.

Merge request reports