0.2.0 • Published 5 years ago

fontsubset v0.2.0

Weekly downloads
17
License
-
Repository
github
Last release
5 years ago

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 ...

0.2.0

5 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago