can't decode WOFF2 where only hmtx is transformed, but not glyf
- Dominant language
- C++
- Stars
- 1.8k
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
The following zip archive contains two WOFF2 fonts.
In the first ("TestTTF-Regular+hmtx+glyf.woff2") both the glyf (and loca) and hmtx table are transformed; in the second font ("TestTTF-Regular+hmtx-glyf.woff2") only the hmtx table is transformed, whereas the glyf and loca are stored in their original form without pre-processing transformation.
Decompressing with woff2_decompress the first font (with all tables trasformed) completes successfully, whereas attempting to decompress the second font (where only hmtx is transformed but not glyf+loca) fails.
https://github.com/khaledhosny/ots/files/3281395/test-woff2-hmtx-transform.zip
As far as I know, the WOFF2 spec doesn't say that whenever hmtx is transformed, glyf should also be transformed. Only glyf and loca have to be transformed or not transformed together.
I reported the same issue in https://github.com/khaledhosny/ots/issues/190, which uses the google/woff2 library to decode WOFF2 fonts.
Contributor guide
Assessment
This issue has not been assessed yet.