allanguys / font-spider-plus

font-spider-plus(字蛛+)是一个智能 WebFont 压缩工具,它能自动分析出本地页面和线上页面使用的 WebFont 并进行按需压缩。
MIT License
710 stars 51 forks source link

使用中的问题 #12

Closed GracefulTing closed 4 years ago

GracefulTing commented 5 years ago

font.css: @font-face { font-family: 'SourceHanSerifCN'; src: url('SourceHanSerifCN-Bold.ttf'); font-weight: normal; font-style: normal; }

body{ font-family: 'SourceHanSerifCN'; }

运行:fsp local index.html如下: \ 正在优化...not support cmap format:14 √ 没有发现可以优化的自定义字体

重新启动项目发现字体又恢复原来的样式了。

allanguys commented 5 years ago

字体文件是ttf格式么?可以把字体文件发上来看下

GracefulTing commented 5 years ago

字体文件是ttf格式么?可以把字体文件发上来看下

好像发不了ttf文件,不支持这种格式。从网上下载的,是思源宋体SourceHanSerifCN-Regular.ttf

mt4c commented 5 years ago

https://github.com/Pal3love/Source-Han-TrueType 这里可以找到