pabs3 | 3697259 | 2008-05-16 08:45:43 +0000 | [diff] [blame] | 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 |
| 22 | is a tool for manipulating TrueType and OpenType fonts. It can convert |
| 23 | TrueType and OpenType fonts to and from an |
| 24 | .Tn XML Ns -based format called |
| 25 | .Tn TTX . |
| 26 | .Tn TTX |
| 27 | files have a |
| 28 | .Ql .ttx |
| 29 | extension. |
| 30 | .Pp |
| 31 | For each |
| 32 | .Ar file |
| 33 | argument it is given, |
| 34 | .Nm |
| 35 | detects whether it is a |
| 36 | .Ql .ttf , |
| 37 | .Ql .otf |
| 38 | or |
| 39 | .Ql .ttx |
| 40 | file and acts accordingly: if it is a |
| 41 | .Ql .ttf |
| 42 | or |
| 43 | .Ql .otf |
| 44 | file, it generates a |
| 45 | .Ql .ttx |
| 46 | file; if it is a |
| 47 | .Ql .ttx |
| 48 | file, it generates a |
| 49 | .Ql .ttf |
| 50 | or |
| 51 | .Ql .otf |
| 52 | file. |
| 53 | .Pp |
| 54 | By default, every output file is created in the same directory as the |
| 55 | corresponding input file and with the same name except for the |
| 56 | extension, which is substituted appropriately. |
| 57 | .Nm |
pabs3 | 1344bc9 | 2010-01-09 09:12:11 +0000 | [diff] [blame^] | 58 | never overwrites existing files; if necessary, it appends a suffix to |
pabs3 | 3697259 | 2008-05-16 08:45:43 +0000 | [diff] [blame] | 59 | the 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 |
| 64 | Display usage information. |
| 65 | .It Fl d Ar dir |
| 66 | Write the output files to directory |
| 67 | .Ar dir |
| 68 | instead of writing every output file to the same directory as the |
| 69 | corresponding input file. |
| 70 | .It Fl v |
| 71 | Be verbose. Write more messages to the standard output describing what |
| 72 | is being done. |
| 73 | .It Fl a |
| 74 | Allow virtual glyphs ID's on compile or decompile. |
| 75 | .El |
| 76 | .Ss "Dump options" |
| 77 | The following options control the process of dumping font files |
| 78 | (TrueType or OpenType) to |
| 79 | .Tn TTX |
| 80 | files. |
| 81 | .Bl -tag -width ".Fl t Ar table" |
| 82 | .It Fl l |
| 83 | List table information. Instead of dumping the font to a |
| 84 | .Tn TTX |
| 85 | file, display minimal information about each table. |
| 86 | .It Fl t Ar table |
| 87 | Dump table |
| 88 | .Ar table . |
| 89 | This option may be given multiple times to dump several tables at |
| 90 | once. When not specified, all tables are dumped. |
| 91 | .It Fl x Ar table |
| 92 | Exclude table |
| 93 | .Ar table |
| 94 | from the list of tables to dump. This option may be given multiple |
| 95 | times to exclude several tables from the dump. The |
| 96 | .Fl t |
| 97 | and |
| 98 | .Fl x |
| 99 | options are mutually exclusive. |
| 100 | .It Fl s |
| 101 | Split tables. Dump each table to a separate |
| 102 | .Tn TTX |
| 103 | file and write (under the name that would have been used for the output |
| 104 | file if the |
| 105 | .Fl s |
| 106 | option had not been given) one small |
| 107 | .Tn TTX |
| 108 | file containing references to the individual table dump files. This |
| 109 | file can be used as input to |
| 110 | .Nm |
| 111 | as 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. |
| 114 | Don't disassemble TrueType instructions. When this option is specified, |
| 115 | all TrueType programs (glyph programs, the font program and the |
| 116 | pre-program) are written to the |
| 117 | .Tn TTX |
| 118 | file as hexadecimal data instead of |
| 119 | assembly. This saves some time and results in smaller |
| 120 | .Tn TTX |
| 121 | files. |
pabs3 | 6f22ca4 | 2009-11-08 11:19:51 +0000 | [diff] [blame] | 122 | .It Fl y Ar n |
| 123 | When decompiling a TrueType Collection (TTC) file, |
| 124 | decompile font number |
| 125 | .Ar n , |
| 126 | starting from 0. |
pabs3 | 3697259 | 2008-05-16 08:45:43 +0000 | [diff] [blame] | 127 | .El |
| 128 | .Ss "Compilation options" |
| 129 | The following options control the process of compiling |
| 130 | .Tn TTX |
| 131 | files into font files (TrueType or OpenType): |
| 132 | .Bl -tag -width ".Fl t Ar table" |
| 133 | .It Fl m Ar fontfile |
| 134 | Merge the input |
| 135 | .Tn TTX |
| 136 | file |
| 137 | .Ar file |
| 138 | with |
| 139 | .Ar fontfile . |
| 140 | No more than one |
| 141 | .Ar file |
| 142 | argument can be specified when this option is used. |
| 143 | .It Fl b |
| 144 | Don't recalculate glyph bounding boxes. Use the values in the |
| 145 | .Tn TTX |
| 146 | file as is. |
| 147 | .El |
| 148 | .Sh "THE TTX FILE FORMAT" |
| 149 | You can find some information about the |
| 150 | .Tn TTX |
| 151 | file format in |
| 152 | .Pa documentation.html . |
| 153 | In particular, you will find in that file the list of tables understood by |
| 154 | .Nm |
| 155 | and the relations between TrueType GlyphIDs and the glyph names used in |
| 156 | .Tn TTX |
| 157 | files. |
| 158 | .Sh EXAMPLES |
| 159 | In the following examples, all files are read from and written to the |
| 160 | current directory. Additionally, the name given for the output file |
| 161 | assumes in every case that it did not exist before |
| 162 | .Nm |
| 163 | was invoked. |
| 164 | .Pp |
| 165 | Dump the TrueType font contained in |
| 166 | .Pa FreeSans.ttf |
| 167 | to |
| 168 | .Pa FreeSans.ttx : |
| 169 | .Pp |
| 170 | .Dl ttx FreeSans.ttf |
| 171 | .Pp |
| 172 | Compile |
| 173 | .Pa MyFont.ttx |
| 174 | into a TrueType or OpenType font file: |
| 175 | .Pp |
| 176 | .Dl ttx MyFont.ttx |
| 177 | .Pp |
| 178 | List the tables in |
| 179 | .Pa FreeSans.ttf |
| 180 | along with some information: |
| 181 | .Pp |
| 182 | .Dl ttx -l FreeSans.ttf |
| 183 | .Pp |
| 184 | Dump the |
| 185 | .Sq cmap |
| 186 | table from |
| 187 | .Pa FreeSans.ttf |
| 188 | to |
| 189 | .Pa FreeSans.ttx : |
| 190 | .Pp |
| 191 | .Dl ttx -t cmap FreeSans.ttf |
| 192 | .Sh NOTES |
| 193 | On MS\-Windows and MacOS, |
| 194 | .Nm |
| 195 | is 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 |
| 206 | was written by |
| 207 | .An -nosplit |
| 208 | .An "Just van Rossum" Aq just@letterror.com . |
| 209 | .Pp |
| 210 | This manual page was written by |
| 211 | .An "Florent Rougon" Aq f.rougon@free.fr |
| 212 | for the Debian GNU/Linux system based on the existing FontTools |
| 213 | documentation. It may be freely used, modified and distributed without |
| 214 | restrictions. |
| 215 | .\" For Emacs: |
| 216 | .\" Local Variables: |
| 217 | .\" fill-column: 72 |
| 218 | .\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" |
| 219 | .\" sentence-end-double-space: t |
| 220 | .\" End: |