ttx

usage: ttx [options] inputfile1 [... inputfileN]

TTX %s – From OpenType To XML And Back

If an input file is a TrueType or OpenType font file, it will be
dumped to an TTX file (an XML-based text format).
If an input file is a TTX file, it will be compiled to a TrueType
or OpenType font file.
Output files are created so they are unique: an existing file is
never overwritten.

General options: -h Help: print this message -d <outputfolder> Specify a directory where the output files are

to be created.

-o <outputfile> Specify a file to write the output to. -v Verbose: more messages will be written to stdout about what

is being done.

-a allow virtual glyphs ID’s on compile or decompile.

Dump options: -l List table info: instead of dumping to a TTX file, list some

minimal info about each table.
-t <table> Specify a table to dump. Multiple -t options
are allowed. When no -t option is specified, all tables will be dumped.
-x <table> Specify a table to exclude from the dump. Multiple
-x options are allowed. -t and -x are mutually exclusive.
-s Split tables: save the TTX data into separate TTX files per
table and write one small TTX file that contains references to the individual table dumps. This file can be used as input to ttx, as long as the table files are in the same directory.
-i Do NOT disassemble TT instructions: when this option is given,
all TrueType programs (glyph programs, the font program and the pre-program) will be written to the TTX file as hex data instead of assembly. This saves some time and makes the TTX file smaller.
-e Don’t ignore decompilation errors, but show a full traceback
and abort.
-y <number> Select font number for TrueType Collection,
starting from 0.

Compile options: -m Merge with TrueType-input-file: specify a TrueType or OpenType

font file to be merged with the TTX file. This option is only valid when at most one TTX file is specified.
-b Don’t recalc glyph bounding boxes: use the values in the TTX
file as-is.
fontTools.ttx.usage()
fontTools.ttx.makeOutputFileName(input, outputDir, extension)
class fontTools.ttx.Options(rawOptions, numFiles)
outputDir = None
outputFile = None
verbose = 0
listTables = 0
splitTables = 0
disassembleInstructions = 1
mergeFile = None
recalcBBoxes = 1
allowVID = 0
ignoreDecompileErrors = True
fontTools.ttx.ttList(input, output, options)
fontTools.ttx.ttDump(input, output, options)
fontTools.ttx.ttCompile(input, output, options)
fontTools.ttx.guessFileType(fileName)
fontTools.ttx.parseOptions(args)
fontTools.ttx.process(jobs, options)
fontTools.ttx.waitForKeyPress()

Force the DOS Prompt window to stay open so the user gets a chance to see what’s wrong.

fontTools.ttx.main(args)