NAME
ttftable - import, export, or delete TrueType font tables
SYNOPSIS
ttftable [options] infile.ttf [outfile.ttf]
Opens infile.ttf for reading, optionally imports, exports, and/or deletes tables from the font, then writes the modified font to outfile.ttf if provided.
OPTIONS
-export tag[,tag...] List of tables to export to default datafiles
-export "tag=fname" Name of table to export to named datafile
-import tag[,tag...] List of tables to import from default datafiles
-import "tag=fname" Name of table to import from named datafile
-delete tag[,tag...] List of tables to remove from font
-update tag[,tag...] Force a re-build of the named tables
-script tag[,tag...] Remove the given script tags from the opentype tables
-list Write a list of table tags from infile.ttf to STDOUT
-verbose Verbose output
-text Use text mode i/o for datafiles
-xport alias for -export (thus permitting -x)
-help Help
Option names may be abbreviated as much as you like; -export, -import, -delete and -update options may be repeated.
DESCRIPTION
After opening font file infile.ttf, ttftable can export one or more of the truetype tables to separate files, import one or more font tables from separate files, and/or delete specified tables from the font.
Changes are written to outfile.ttf if supplied.
Tables are identified by their four-character tag. 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)
all all tables in the font (use with caution!)
The parameter to -export and -import is a table tag optionally followed by equals sign and a filename. If the filename is not provided, ttftable makes up a file name by appending ".tagname.dat" to the input font file name. CAUTION: Windows users should include quotes around parameters of the form tag=fname.
-update is a debugging tool that forces the named tables to be read in detail, then "dirties" them, and finally updates the font. This should bring the font into consistent state if it wasn't before. Note that, due to their interrelated nature, updating either the 'loca' or the 'glyf' table updates both and will cause every glyph to be read and parsed and then reconstructed, taking significantly more time.
Font tables such as TSIV that contain text use various conventions for line ending. During -export, the -text option will convert any line-endings in the font data to what is needed by your platform. During -import, the -text option simply converts your platform line endings to newline (\n) character, which may not be what you want, so use with caution.
Arrangements of command line options that import and export the same table and/or the same data file will "do the right thing" except that external files can contain only one table.
EXAMPLES
# list of tables in a font
ttftable -l myfont.ttf
# list of tables and their details such as offset, size, checksum
ttftable -l -v myfont.ttf
# extract VOLT source from a font:
ttftable -e "TSIV=myfont.vtp" -t myfont.ttf
# extract all tables into separate binary files
ttftable -e all myfont.ttf
# Create a new font by deleting all OpenType tables
ttftable -d opentype myfont.ttf newfont.ttf
# Create a new font by deleting the given scripts from the OpenType tables
ttftable -s mymr,DFLT myfont.ttf newfont.ttf
BUGS
Deleting Graphite or OpenType tables does not remove name table strings that are used for feature names and values.
The pseudo tags graphite
, volt
, opentype
and all
cannot be used in conjunction with the =fname
capability.
AUTHOR
Bob Hallissy 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.