ttfsubset - subset a font
ttfsubset [options] infont outfont
Opens infont (a .ttf file), subsets it according to the supplied options, then writes the resulting file to outfont.
-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)
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:
-d
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.
-g
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.
-s
-l
-l ''
ttfsubset is an evolving tool and the invitation is given to contribute improvements that will result in smaller output fonts.
To install Font::Fret, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Font::Fret
CPAN shell
perl -MCPAN -e shell install Font::Fret
For more information on module installation, please visit the detailed CPAN module installation guide.