If I generate a variable TTF with Glyphs and compress it with woff2_compress, I save an extra 5% or so on file size compared to the WOFF2 file generated directly by Glyphs. I’m curious why that could be - is woff2_compress stripping out anything important?
And you get another file size of you do it from within OTMaster. My guess is that they’re normalizing the file contents differently before compressing.
oh interesting. that would make sense, maybe something at the glyph level given that fonts with more glyphs have a bigger discrepancy (still ~5%)
Is it CFF or TTF?
If it is CFF, what may make a difference is to not use subroutinization, but let brotli do the compression instead. But YMMV.
Also, posterizing (rounding) GPOS values can lead to smaller file sizes. In other words, creating many rendundant items in the font data for brotli or zopfli compression to chew on.
TTF - have been testing on variable fonts
In other words, creating many rendundant items in the font data for brotli or zopfli compression to chew on.
ahh yeah that makes sense. tricky to optimize depending on what the design calls for
Glyphs uses “woff2_compress”, too. So maybe it was improved since I last update it.
I checked and the version in Glyphs was build after the last significant changes were done. But the brotli library is actively worked on. So that might cause the difference. I rebuild a new binary from the latest version and it produced a file 20 bytes smaller than before.
What exact version of woff2_compress did you use and where did you get it?
version 1.0.2, from homebrew. I just tried building from latest sources and the result is the same