使用Python 压缩字体文件
...小于 1 分钟
使用Python 压缩字体文件
使用 fonttools 压缩字体文件
pip install fonttools
下载字体编码文件,存储到本地
执行压缩命令 字体文件和字体编码放在同一个文件夹下面

执行压缩命令
pyftsubset YanShiYouRanXiaoKai-2.ttf --unicodes-file=sc_unicode.txt


使用cloudconvert网站把ttf字体转换一下能减少字体的大小

项目中直接使用转换成woff2格式的图片就可以

Powered by Waline v2.15.5