> > This means that you can quickly extract the number of TTC subfonts, > right?
Yes, this value is also stored in `WOFF2_HeaderRec' as `num_fonts'. > > > One solution is to load all the faces in the WOFF2 and write all > > tables along with the TTC header. This may slow down the process if > > all the faces have a transformed glyf or hmtx table. > > It's not clear to me why you have to load all faces. As far as I can > see, you need two calls. The first call is to load the TTC header to > get the number of subfonts. This value could be stored somewhere to > cache it for the `index = -1' case. > > Another call (for index < -1 case) then investigates the subfont in > question to find out the number of named instances. > > What am I missing? Yes, this is exactly what I'm doing right now (locally, not pushed yet), except for finding the number of named instances in the WOFF2 face. So are you suggesting that `sfwoff2.c' directly output the total number of faces and named instances (if the index is < 0) and exit with error so that FT_Open_Face does not try to read and output this data again? -- Nikhil _______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
