Hi,
We encountered a few (potentially not fully compliant with the specification)
CFF fonts (i.e. CIDFontType0) that have enough information to be rendered, but
FreeType throws an exception due to not having both the `head` and the `cmap`
tables.
I was wondering if the second `goto Exit;` in the following code could be
changed to just logging a warning? With this change fonts that are missing the
`head` table and don’t have a `cmap` could still be rendered.
In src/cff/cffobjs.c :
/* now, the font can be either an OpenType/CFF font, or an SVG CEF */
/* font; in the latter case it doesn't have a `head' table */
error = face->goto_table( face, TTAG_head, stream, 0 );
if ( !error )
{
pure_cff = 0;
/* load font directory */
error = sfnt->load_face( stream, face, face_index,
num_params, params );
if ( error )
goto Exit;
}
else
{
/* load the `cmap' table explicitly */
error = sfnt->load_cmap( face, stream );
if ( error )
goto Exit;
}
Thank you,
Andrei