• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.Dd May 18, 2004
2.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7)
3.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to
4.\" be used, so I give a zero-width space as its argument.
5.Os \&
6.\" The "FontTools Manual" argument apparently has no effect in
7.\" groff 1.18.1. I think it is a bug in the -mdoc groff package.
8.Dt TTX 1 "FontTools Manual"
9.Sh NAME
10.Nm ttx
11.Nd tool for manipulating TrueType and OpenType fonts
12.Sh SYNOPSIS
13.Nm
14.Bk
15.Op Ar option ...
16.Ek
17.Bk
18.Ar file ...
19.Ek
20.Sh DESCRIPTION
21.Nm
22is a tool for manipulating TrueType and OpenType fonts.  It can convert
23TrueType and OpenType fonts to and from an
24.Tn XML Ns -based format called
25.Tn TTX .
26.Tn TTX
27files have a
28.Ql .ttx
29extension.
30.Pp
31For each
32.Ar file
33argument it is given,
34.Nm
35detects whether it is a
36.Ql .ttf ,
37.Ql .otf
38or
39.Ql .ttx
40file and acts accordingly: if it is a
41.Ql .ttf
42or
43.Ql .otf
44file, it generates a
45.Ql .ttx
46file; if it is a
47.Ql .ttx
48file, it generates a
49.Ql .ttf
50or
51.Ql .otf
52file.
53.Pp
54By default, every output file is created in the same directory as the
55corresponding input file and with the same name except for the
56extension, which is substituted appropriately.
57.Nm
58never overwrites existing files; if necessary, it appends a suffix to
59the output file name before the extension, as in
60.Pa Arial#1.ttf .
61.Ss "General options"
62.Bl -tag -width ".Fl t Ar table"
63.It Fl h
64Display usage information.
65.It Fl d Ar dir
66Write the output files to directory
67.Ar dir
68instead of writing every output file to the same directory as the
69corresponding input file.
70.It Fl o Ar file
71Write the output to
72.Ar file
73instead of writing it to the same directory as the
74corresponding input file.
75.It Fl v
76Be verbose.  Write more messages to the standard output describing what
77is being done.
78.It Fl a
79Allow virtual glyphs ID's on compile or decompile.
80.El
81.Ss "Dump options"
82The following options control the process of dumping font files
83(TrueType or OpenType) to
84.Tn TTX
85files.
86.Bl -tag -width ".Fl t Ar table"
87.It Fl l
88List table information.  Instead of dumping the font to a
89.Tn TTX
90file, display minimal information about each table.
91.It Fl t Ar table
92Dump table
93.Ar table .
94This option may be given multiple times to dump several tables at
95once.  When not specified, all tables are dumped.
96.It Fl x Ar table
97Exclude table
98.Ar table
99from the list of tables to dump.  This option may be given multiple
100times to exclude several tables from the dump.  The
101.Fl t
102and
103.Fl x
104options are mutually exclusive.
105.It Fl s
106Split tables.  Dump each table to a separate
107.Tn TTX
108file and write (under the name that would have been used for the output
109file if the
110.Fl s
111option had not been given) one small
112.Tn TTX
113file containing references to the individual table dump files.  This
114file can be used as input to
115.Nm
116as long as the referenced files can be found in the same directory.
117.It Fl i
118.\" XXX: I suppose OpenType programs (exist and) are also affected.
119Don't disassemble TrueType instructions.  When this option is specified,
120all TrueType programs (glyph programs, the font program and the
121pre-program) are written to the
122.Tn TTX
123file as hexadecimal data instead of
124assembly.  This saves some time and results in smaller
125.Tn TTX
126files.
127.It Fl y Ar n
128When decompiling a TrueType Collection (TTC) file,
129decompile font number
130.Ar n ,
131starting from 0.
132.El
133.Ss "Compilation options"
134The following options control the process of compiling
135.Tn TTX
136files into font files (TrueType or OpenType):
137.Bl -tag -width ".Fl t Ar table"
138.It Fl m Ar fontfile
139Merge the input
140.Tn TTX
141file
142.Ar file
143with
144.Ar fontfile .
145No more than one
146.Ar file
147argument can be specified when this option is used.
148.It Fl b
149Don't recalculate glyph bounding boxes.  Use the values in the
150.Tn TTX
151file as is.
152.El
153.Sh "THE TTX FILE FORMAT"
154You can find some information about the
155.Tn TTX
156file format in
157.Pa documentation.html .
158In particular, you will find in that file the list of tables understood by
159.Nm
160and the relations between TrueType GlyphIDs and the glyph names used in
161.Tn TTX
162files.
163.Sh EXAMPLES
164In the following examples, all files are read from and written to the
165current directory.  Additionally, the name given for the output file
166assumes in every case that it did not exist before
167.Nm
168was invoked.
169.Pp
170Dump the TrueType font contained in
171.Pa FreeSans.ttf
172to
173.Pa FreeSans.ttx :
174.Pp
175.Dl ttx FreeSans.ttf
176.Pp
177Compile
178.Pa MyFont.ttx
179into a TrueType or OpenType font file:
180.Pp
181.Dl ttx MyFont.ttx
182.Pp
183List the tables in
184.Pa FreeSans.ttf
185along with some information:
186.Pp
187.Dl ttx -l FreeSans.ttf
188.Pp
189Dump the
190.Sq cmap
191table from
192.Pa FreeSans.ttf
193to
194.Pa FreeSans.ttx :
195.Pp
196.Dl ttx -t cmap FreeSans.ttf
197.Sh NOTES
198On MS\-Windows and MacOS,
199.Nm
200is available as a graphical application to which files can be dropped.
201.Sh SEE ALSO
202.Pa documentation.html
203.Pp
204.Xr fontforge 1 ,
205.Xr ftinfo 1 ,
206.Xr gfontview 1 ,
207.Xr xmbdfed 1 ,
208.Xr Font::TTF 3pm
209.Sh AUTHORS
210.Nm
211was written by
212.An -nosplit
213.An "Just van Rossum" Aq just@letterror.com .
214.Pp
215This manual page was written by
216.An "Florent Rougon" Aq f.rougon@free.fr
217for the Debian GNU/Linux system based on the existing FontTools
218documentation.  It may be freely used, modified and distributed without
219restrictions.
220.\" For Emacs:
221.\" Local Variables:
222.\" fill-column: 72
223.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\|   \\|  \\)[   \n]*"
224.\" sentence-end-double-space: t
225.\" End: