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
.woff2
sometimes bigger than .woff
#773
Comments
.woff
smaller while .woff2
stayed at the sime filesize.woff2
sometimes bigger than .woff
I don't have the bandwidth at the moment to investigate this properly but this should be related to this PR. I'm curious exactly what the WOFF files don't have in comparison to WOFF2. Since we're targeting a very niche user-agent on Google's API, it's also likely they had a regression in terms of feature parity or language subsetting. |
The subset-specific CSS files are a legacy artefact from when we supported users migrating from the Typefaces Project. The CSS is the same as their sources. But, I actually agree that we should include
This is just a difference in CSS, leading to the same binary files. A little more digging into this indicates this is likely due to hinting for Windows machines included in the This is the source metadata we use to package the binary files straight from Google's CDNs.
Loading these files into Wakamai Fondue confirms that they support the same number of characters. However, a closer examination of the individual glyphs reveals differences in rendering. The change introduced in the related PR switches the user-agent to a Safari agent for As for fixing this. I'm not sure how we should approach this. The PR to subset |
Is the hinting required in browsers on windows? I would prefer to have smaller font in the browser if the hinting is not being used anyway. Not sure if that is a good solution tho I know nearly nothing about fonts :) |
It very much is or else the fonts render really badly on Windows machines specifically. |
Thank you for the replies and looking into this I really appreciate it. |
After some googling I just found this issue -- to make sure I understand:
So while one of the symptoms of this bug is that fonts in And it sounds like the potential solutions are:
Does that seem accurate? |
@caass, that's a spot on summary of this issue! Ideally, I would want to find a suitable user-agent that allows Google Fonts into giving us the correct hinted subsets since that is the safest option from a licensing sense (see 2.2 from this OFL FAQ) and also fixes the bug for users of the upstream google-font-metadata library too. In hindsight, I think the I'm a little undecided on decompressing the WOFF2 files since I think it complicates a lot of facets of this project. I'll hold off on commenting on that until we're sure the user-agent approached can't be used. cc; @rsheeter (if you may have a better idea of what user-agent might be appropriate to get around this) |
Describe the bug
It looks like version 5 made some
.woff
files smaller in some cases, while.woff2
stayed at the same filesize, making them sometimes bigger than the.woff
equivalentSteps to Reproduce
lato-latin-400-normal.woff
: 28.6k,lato-latin-400-normal.woff2
: 23.6k tolato-latin-400-normal.woff
: 17.4k,lato-latin-400-normal.woff2
: stayed the sameroboto-latin-400-normal.woff
: 20.3k,roboto-latin-400-normal.woff2
: 15.7k toroboto-latin-400-normal.woff
: 14.4k,roboto-latin-400-normal.woff2
: stayed the sameWhile these tests are on 5.0.0 the same applies for 5.0.4
Expected behavior
I'd expect
.woff2
to be smaller than.woff
Version
5.0.4
OS
Linux
Browser
Firefox
Additional context
No response
The text was updated successfully, but these errors were encountered: