Hi,

I have been going through the WOFF2 specifications, and there a lot of
optional fields in various tables.

For example, the header size is fixed (48 bytes), but the table
directory (https://www.w3.org/TR/WOFF2/#table_dir_format) has 2
optional fields, `tag' and `transformLength'. In addition, the data
type 255UInt16 can be one to three bytes and UIntBase128 can be *upto*
5 bytes long.

My question is, how can reading these variable-length streams be
handled with `FT_FRAME_ENTER' and supporting macros? `FT_FRAME_ENTER'
requires a fixed frame size, which I believe is always the number of
bytes the cursor traverses by the time `FT_FRAME_EXIT' is called
(please correct me if I am wrong about this).

This would mean that if I take the frame size to be the sum of the
upper bounds of the sizes of all possible fields, I will be
overshooting in most cases. Is there a correct solution to this that
I'm missing?

Thanks!

-- 
Nikhil

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

Reply via email to