blob: db463a22aa34f33378aea426bba6b7935ffebcc4 [file] [log] [blame]
pabs336972592008-05-16 08:45:43 +00001.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
pabs31344bc92010-01-09 09:12:11 +000058never overwrites existing files; if necessary, it appends a suffix to
pabs336972592008-05-16 08:45:43 +000059the 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 v
71Be verbose. Write more messages to the standard output describing what
72is being done.
73.It Fl a
74Allow virtual glyphs ID's on compile or decompile.
75.El
76.Ss "Dump options"
77The following options control the process of dumping font files
78(TrueType or OpenType) to
79.Tn TTX
80files.
81.Bl -tag -width ".Fl t Ar table"
82.It Fl l
83List table information. Instead of dumping the font to a
84.Tn TTX
85file, display minimal information about each table.
86.It Fl t Ar table
87Dump table
88.Ar table .
89This option may be given multiple times to dump several tables at
90once. When not specified, all tables are dumped.
91.It Fl x Ar table
92Exclude table
93.Ar table
94from the list of tables to dump. This option may be given multiple
95times to exclude several tables from the dump. The
96.Fl t
97and
98.Fl x
99options are mutually exclusive.
100.It Fl s
101Split tables. Dump each table to a separate
102.Tn TTX
103file and write (under the name that would have been used for the output
104file if the
105.Fl s
106option had not been given) one small
107.Tn TTX
108file containing references to the individual table dump files. This
109file can be used as input to
110.Nm
111as long as the referenced files can be found in the same directory.
112.It Fl i
113.\" XXX: I suppose OpenType programs (exist and) are also affected.
114Don't disassemble TrueType instructions. When this option is specified,
115all TrueType programs (glyph programs, the font program and the
116pre-program) are written to the
117.Tn TTX
118file as hexadecimal data instead of
119assembly. This saves some time and results in smaller
120.Tn TTX
121files.
pabs36f22ca42009-11-08 11:19:51 +0000122.It Fl y Ar n
123When decompiling a TrueType Collection (TTC) file,
124decompile font number
125.Ar n ,
126starting from 0.
pabs336972592008-05-16 08:45:43 +0000127.El
128.Ss "Compilation options"
129The following options control the process of compiling
130.Tn TTX
131files into font files (TrueType or OpenType):
132.Bl -tag -width ".Fl t Ar table"
133.It Fl m Ar fontfile
134Merge the input
135.Tn TTX
136file
137.Ar file
138with
139.Ar fontfile .
140No more than one
141.Ar file
142argument can be specified when this option is used.
143.It Fl b
144Don't recalculate glyph bounding boxes. Use the values in the
145.Tn TTX
146file as is.
147.El
148.Sh "THE TTX FILE FORMAT"
149You can find some information about the
150.Tn TTX
151file format in
152.Pa documentation.html .
153In particular, you will find in that file the list of tables understood by
154.Nm
155and the relations between TrueType GlyphIDs and the glyph names used in
156.Tn TTX
157files.
158.Sh EXAMPLES
159In the following examples, all files are read from and written to the
160current directory. Additionally, the name given for the output file
161assumes in every case that it did not exist before
162.Nm
163was invoked.
164.Pp
165Dump the TrueType font contained in
166.Pa FreeSans.ttf
167to
168.Pa FreeSans.ttx :
169.Pp
170.Dl ttx FreeSans.ttf
171.Pp
172Compile
173.Pa MyFont.ttx
174into a TrueType or OpenType font file:
175.Pp
176.Dl ttx MyFont.ttx
177.Pp
178List the tables in
179.Pa FreeSans.ttf
180along with some information:
181.Pp
182.Dl ttx -l FreeSans.ttf
183.Pp
184Dump the
185.Sq cmap
186table from
187.Pa FreeSans.ttf
188to
189.Pa FreeSans.ttx :
190.Pp
191.Dl ttx -t cmap FreeSans.ttf
192.Sh NOTES
193On MS\-Windows and MacOS,
194.Nm
195is available as a graphical application to which files can be dropped.
196.Sh SEE ALSO
197.Pa documentation.html
198.Pp
199.Xr fontforge 1 ,
200.Xr ftinfo 1 ,
201.Xr gfontview 1 ,
202.Xr xmbdfed 1 ,
203.Xr Font::TTF 3pm
204.Sh AUTHORS
205.Nm
206was written by
207.An -nosplit
208.An "Just van Rossum" Aq just@letterror.com .
209.Pp
210This manual page was written by
211.An "Florent Rougon" Aq f.rougon@free.fr
212for the Debian GNU/Linux system based on the existing FontTools
213documentation. It may be freely used, modified and distributed without
214restrictions.
215.\" For Emacs:
216.\" Local Variables:
217.\" fill-column: 72
218.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*"
219.\" sentence-end-double-space: t
220.\" End: