googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
239 stars 21 forks source link

Add support for compressing PNGs using zopflipng #392

Closed anthrotype closed 2 years ago

anthrotype commented 2 years ago

Part of https://github.com/googlefonts/nanoemoji/issues/388

requires https://github.com/fonttools/py-zopfli/pull/17 to be merged and released first

Also, no tests yet so marking as draft Added tests exercising --use_zopflipng / --nouse_zopflipng CLI flag

UPDATE: py-zopfli 0.2.0 with png support released => https://github.com/fonttools/py-zopfli/releases/tag/v0.2.0

anthrotype commented 2 years ago

With this PR, CBDT table for (nanoemoji-built) Noto Emoji shrinked by -35%, from 27MB to 17MB. Still some way to go to reach the size of the original CBDT font (around 9MB). I hope pngquant will help get there.