0.2.0 • Published 7 years ago
fontsubset v0.2.0
A font subset extraction tool using google sfntly.
You can use it get a tiny font size, especially for webfont.
Install
npm install fontsubset -gNote: 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 numberExamples
fontsubset -s 'Hello World' font/arial.ttf output/arial-subset.ttffontsubset -s '世界,你好!' font/微软雅黑.ttf output/微软雅黑-subset.ttfUse text file:
fontsubset -t text-cn.txt font/微软雅黑.ttf output/微软雅黑-subset.ttfmulti text files:
fontsubset -t text-cn-1.txt:text-cn-2.txt font/微软雅黑.ttf output/微软雅黑-subset.ttfUse : to split multi files , because ... it is a long story ...