google / woff2

MIT License
1.52k stars 185 forks source link

woff2_decompress fails to unpack superOTC #141

Open davelab6 opened 3 years ago

davelab6 commented 3 years ago

https://twitter.com/ken_lunde/status/1394496314197508103?s=19

Interestingly, @googlefonts’ woff2 project can convert the #SourceHanSans Super OTC into a WOFF2 Collection by executing woff2_compress, but executing woff2_decompress fails to convert the resulting WOFF2 Collection back into an OpenType Collection.

Related to #37

davelab6 commented 3 years ago

The woff_decompress silent failure is due to kDefaultMaxSize being set to 30 × 1024 × 1024, meaning 30MB, and this limit applies to the uncompressed size of the WOFF2. I built two TTCs with sizes just under and just over this threshold: the former succeeded and the latter failed.