NAME

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 [default].
-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)
-H            strips all hinting
-C            strips legacy cmaps

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)
aat       all AAT tables (mort morx feat)
default   all unhandled tables (hdmx vdmx EBDT EBLC EBSC Silt aat)

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. Ranges of glyphs (specified by either glyph ID or postscript name) and of Unicode scalar values can be specified using '..' between the values. Glyph identifiers or ranges may be followed immediately by equals sign and 4 to 6 hex digits to indicate the glyph(s) should be encoded.

A missing -g option results in all glyphs being conserved.

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.

AUTHOR

Martin Hosken http://scripts.sil.org/FontUtils. (see CONTRIBUTORS for other authors).

LICENSING

Copyright (c) 1998-2016, SIL International (http://www.sil.org)

This script is released under the terms of the Artistic License 2.0. For details, see the full text of the license in the file LICENSE.