Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WOFF doesn't seem to need inflate.js #66

Open
RoelN opened this issue Jun 22, 2020 · 5 comments
Open

WOFF doesn't seem to need inflate.js #66

RoelN opened this issue Jun 22, 2020 · 5 comments
Labels
investigate For issues that require investigating before they can be classified.

Comments

@RoelN
Copy link
Collaborator

RoelN commented Jun 22, 2020

Experimenting with Font.js and not loading inflate.js and unbrotli.js, I was surprised to find Font.js being perfectly capable of accepting a WOFF font. (WOFF2 indeed fails as expected on a brotliDecode is not a function).

Happy bug?

@Pomax
Copy link
Owner

Pomax commented Jun 24, 2020

not so happy - binary data should not get automagically unpacked, so that definitely needs investigating.

@Pomax Pomax added the investigate For issues that require investigating before they can be classified. label Sep 9, 2020
@Pomax
Copy link
Owner

Pomax commented Mar 25, 2021

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?

@RoelN
Copy link
Collaborator Author

RoelN commented Mar 29, 2021

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.

@themesociety
Copy link

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.

@Pomax
Copy link
Owner

Pomax commented Mar 29, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate For issues that require investigating before they can be classified.
Projects
None yet
Development

No branches or pull requests

3 participants