Open RoelN opened 4 years ago
not so happy - binary data should not get automagically unpacked, so that definitely needs investigating.
A thought: WOFF (and WOFF2) don't require per-table compression, they only allow per-table compression, so it's entirely possible that WOFF/WOFF2 work just fine without compression dependencies simply because the fonts you're using don't make use of deflated/brotli'd table data.
Did you test this with compressed WOFF/WOFF2 fonts, @RoelN, @themesociety?
I didn't realise this, and assumed all WOFF(2) are compressed. Anecdotally, the WOFF was a lot smaller than the TTF, but I'll verify this with some other WOFF fonts. Will report back.
I thought the same, i think for every woff(2) file i have i get an error if unbrotli is not imported. After releasing our update iam sure we will pretty soon get feedback from users if some fonts are failing because of a missing libarary.
double checking the spec, woff2 should indeed always be compressed (so it'll need unbrotli), but for woff the compression is entirely optional (and a lot of woff don't actually have per-table compression, especially from places like font squirrel etc)
Experimenting with Font.js and not loading
inflate.js
andunbrotli.js
, I was surprised to find Font.js being perfectly capable of accepting a WOFF font. (WOFF2 indeed fails as expected on abrotliDecode is not a function
).Happy bug?