-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Serve WOFF 1.0 font files compressed? #42
Comments
@alrra do you have a CSV of the results handy? I'd like to see a distribution of savings. |
@igrigorik Yes of course, here it is (the download link was included in my first comment, but it seems that it wasn't obvious enough, so I made some changes). |
@alrra thanks! Digging into the data...
So, median savings is ~50 bytes, and ~1k at 85th percentile. That said, I think it's useful to look at the outliers, since that reveals an interesting pattern:
Note that the major savings are all on "All subsets" variants - aka, full, unsubsetted font files. Intuitively, this makes sense, since gzip is likely finding some redundancies across the embedded font tables (WOFF 1.0 compresses each font table separately) and hence the filesize win. Does this warrant a general "gzip WOFF 1.0" recommendation? Personally, I think it's a good to know (tm), but not worth the double compress/decompress overhead for majority of fonts:
|
@igrigorik Thank you, I sincerely appreciate that you took the time to look over this!
As expected, but in my humble opinion, that isn't the usual case, and I would be quite surprised to see that a significant number of people use something like that in production (I included the
I agree.
Plus, I think people should also consider using Zopfli before doing anything else. Closing this issue as it general (re)compressing the |
According to the people from Zoompf (see blog post), it might be worth serving WOFF 1.0 font files compressed (even thought they are compressed by default):
See also: http://www.w3.org/TR/WOFF/
Being curious about this, I wanted to see some more data, so I generate some (the results
are posted in the following comments).How the data was generated
TrueType
format -.ttf
(didn't wanted to use theWOFF
version, as Google recently switched to using Zopfli, which makes the size of the.woff
files smaller then normal)..tff
files to.woff
(+ got the size of the.woff
file -Size (Original)
).woff
files on Apache/2.4.7 (Ubuntu), enabled compression (+ made requests to get the size of the compressed.woff
files -Size (Compressed)
)My results
results.zip
.Graphs
Expanding the
0-10%
from the above graph, it looks like this:My verdict
Thoughts?
The text was updated successfully, but these errors were encountered: