Hi folks, I have implemented functionality to read the WOFF2 header, table directory and collection directory (if the font is a TTC), including most of the checks (given in the specification) in `sfwoff2.c' on the `GSoC-2019-nikhil' branch. It would be *great* if you could review (and also test with a few font files :-) ) the code and provide feedback! The trace output is quite verbose at level 2 and returns `Unimplemented_Feature' after execution.
I have a few observations and questions: * The code in function `woff2_open_font' is already (almost) 300 lines. I believe it would be better to split it up into smaller functions (for instance, one for reading the table directory). Any thoughts? * For TTC fonts, the `Collection Directory' specifies the index of tables that are part of each font in the collection. The `face_index' parameter in `FT_New_Face' specifies which face to load, so does that mean I can use that to directly extract and load only those tables that belong to the font on that index? Do I have to decompress each table and load the whole collection as an SFNT? I'm not sure... * I have written a few macros in `sfwoff2.c' to help with basic calculation and to allow implicit variables. Should I `#undef' these macros towards the end? * Is the code, in general, acceptable? Am I using the FT_* typedefs and macros correctly? Thank you and have a great week! :-) -- Nikhil _______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
