Files
reduce-font/readme.md
2018-06-11 17:06:22 +08:00

26 lines
547 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 关于
此项目用于精简 web 项目的字体。
## 如何使用
#### 修改 index.js将以下三个变量按实际需要配置
```js
// 待抽取字体的字符
var text = '待抽取字体的字符';
// 输入字体路径
var sourceFontFile = 'input.ttf';
// 输出字体名称
var outputFontFile = 'output';
```
#### 执行这个文件
```sh
node "index.js"
```
#### 检查输出
前往`out`目录,打开`test.htm`检查所需的字符是否正常显示。若正常out 目录下的文件即为精简后的字体。