youngjuning / issues

一寸欢喜 - 怕什么真理无穷,进一寸有一寸的欢喜
https://youngjuning.js.org
44 stars 4 forks source link

字蛛·一个中文字体压缩器 #77

Open youngjuning opened 6 years ago

youngjuning commented 6 years ago

Windows

安装

  1. 安装配置nodejs
  2. 安装font-spider:npm install font-spider -g

错误警告

  1. Error: Expecting a function in instanceof check, but got undefined

image

解决方法: 修改 node_modules\font-spider\src\spider\index.js (Ubuntu的node_modules在/usr/local/lib/目录下)文件中的 getWebFonts 函数将以下判断去除:

image

  1. Error: "/home/inc/fonts/pumpkin.ttf" file not found

image

解决方法: .ttf 文件是必须要有的,其他格式的文件会自动生成。

youngjuning commented 6 years ago

Linux

youngjuning commented 6 years ago

参考

  1. tool 使用font-spider解决字体压缩问题
  2. 迟到的中文 WebFont
youngjuning commented 6 years ago

字蛛+(font-spider-plus)

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