💥 FontTools字体压缩

使用Python库压缩字体

第一步,安装fonttools1

pip install fonttools

第二步,下载sc_unicode.txt

第三步,NotoSerifSC.otfsc_unicode.txt放在同级目录下,执行压缩命令:

pyftsubset NotoSerifSC.otf --unicodes-file=sc_unicode.txt

生成NotoSerifSC.subset.otf字体(亲测可用)

字体 压缩前 压缩后 压缩比
NotoSerifSC.otf 10.6MB 2.33MB 21.98%

  1. CSDN,@littleduo,有效的压缩字体方法