Re: [ft-devel] WOFF2 Support Update

2019-08-04 Thread Nikhil Ramakrishnan
> > 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? > > In case this makes life simpler, please do it! The alternative

Re: [ft-devel] WOFF2 Support Update

2019-08-04 Thread Werner LEMBERG
> 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? In case this makes life simpler, please do it! The alternative as

Re: [ft-devel] WOFF2 Support Update

2019-08-04 Thread Nikhil Ramakrishnan
> What am I missing? My main concern is that *after* `woff2_open_font' returns, `sfnt_init_face' attempts to read the TTC header and extract information about the total number of faces, and stores this in `face->num_faces', which will override the value stored by `woff2_open_font'. -- Nikhil

Re: [ft-devel] WOFF2 Support Update

2019-08-04 Thread Nikhil Ramakrishnan
> > 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 >

Re: [ft-devel] WOFF2 Support Update

2019-08-04 Thread Werner LEMBERG
> `woff2_open_font' reads the WOFF2 TTC header and uses that > information to get tables for the requested font index. This means that you can quickly extract the number of TTC subfonts, right? >> However, to get the number of named instances for a variation font >> with index N, loading this