freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] WOFF2 support update and questions


From: Nikhil Ramakrishnan
Subject: [ft-devel] WOFF2 support update and questions
Date: Mon, 17 Jun 2019 00:11:49 +0530

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]