TITLE
ttfsubset - subset a font
SYNOPSIS
ttfsubset [options] infont outfont
Opens infont (a .ttf file), subsets it according to the supplied options, then writes the resulting file to outfont.
OPTIONS
-h Get full help
-d tag[,...] List of font tables to remove.
-g listfile File containing list of glyphs to retain
-s tag[,...] List of OpenType script tags to retain
-l tag[,...] List of OpenType language tags to retain
-n name Renames the font to the given name (as per ttfname -n)
DESCRIPTION
ttfsubset removes parts of a font in order to produce a working, smaller, font. Multiple subsetting strategies are provided and controlled by options.
The -d
option is used to delete whole font tables, e.g., all Graphite tables. A list of four-letter table tags identifies the tables to be removed. As in ttftable, the following (case insensitive) pseudo tags can also be used:
graphite all SIL Graphite tables (Silf Feat Gloc Glat Sill Sile)
volt all Microsoft VOLT tables (TSIV TSID TSIP TSIS)
opentype all OpenTYpe tables (GDEF GSUB GPOS)
The -g
option specifies a file that lists glyphs to be retained in the subset font -- ttfsubset will remove all other glyphs and then do what it can to simplify remaining features. Glyphs are identified in the file using space-separated indentifiers which can be decimal numeric glyph IDs, postscript glyph names, or hexidecimal Unicode scalar values in the format of U+xxxx. Numeric or postscript glyph identifiers can be followed immediately by equals sign and 4 to 6 hex digits to indicate the glyph should be encoded.
The -s
and -l
options identify OpenType script and language (respectively) tags to retain in the font. The Default language is always retained, so specify -l ''
to remove all but the default language.
BUGS
ttfsubset is an evolving tool and the invitation is given to contribute improvements that will result in smaller output fonts.