fontsubset
v0.2.0
Published
A font subset extraction tool using google sfntly
Downloads
13
Readme
A font subset extraction tool using google sfntly.
You can use it get a tiny font size, especially for webfont.
Install
npm install fontsubset -g
Note: Java is required.
Usage
fontsubset [options] fontFile [outputFile]
Options
-s, --string [string] subset string to extract
-t, --text [file:file ...] the text file included subset strings to extract
-b, --base64 output font subset in base64 format
-h, --help output usage information
-V, --version output the version number
Examples
fontsubset -s 'Hello World' font/arial.ttf output/arial-subset.ttf
fontsubset -s '世界,你好!' font/微软雅黑.ttf output/微软雅黑-subset.ttf
Use text file:
fontsubset -t text-cn.txt font/微软雅黑.ttf output/微软雅黑-subset.ttf
multi text files:
fontsubset -t text-cn-1.txt:text-cn-2.txt font/微软雅黑.ttf output/微软雅黑-subset.ttf
Use :
to split multi files , because ... it is a long story ...