> With commit af7d296 (in branch `GSoC-2019-nikhil'), we can now quite
> efficiently convert a WOFF2 to an SFNT font, which can then be
> rendered by FreeType.

Great!

> (1) If the WOFF2 is a TTC, only the requested face is loaded. So,
> instead of a TTC, we generate a single-face sfnt with one offset
> table, table record and so on...  [...]
> 
> The issue with (1) is that if I call `FT_New_Face' for a woff2 file
> with a negative index (which is supposed to provide information on
> the specific face), the code in `sfobjs.c' will only see a single
> face, which means `face->num_faces' will be set to 1.  I'm not
> really sure how to handle this.  Any suggestions?

Hmm.  The functionality of negative `face_index' values as documented
in the description of `FT_Open_Face' must work for WOFF2, too.  So, to
get the number of faces in a TTC, you have to read the TTC header.

However, to get the number of named instances for a variation font
with index N, loading this font should be sufficient.  You still have
to get the number of faces in a TTC just to find out whether the
requested subfont can be loaded at all.


    Werner

_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to