1OTFTOTFM(1) General Commands Manual OTFTOTFM(1)
2
3
4
6 otftotfm - create TeX font metrics from OpenType fonts
7
9 otftotfm [-a] [options] fontfile [texname]
10
12 Otftotfm creates the font metric and encoding files required to use an
13 OpenType font with TeX. You supply an OpenType ".otf" or ".ttf" font
14 file, a base ".enc" encoding, and a TeX name "texname" for the result‐
15 ing font, and say which OpenType features should be turned on. Then
16 otftotfm generates and installs the corresponding TeX-related metric
17 files (".tfm" TeX font metrics, ".vf" virtual fonts, and ".enc" encod‐
18 ing files). It works on both PostScript-flavored and TrueType-flavored
19 OpenType fonts, although TrueType-flavor support will only work easily
20 with pdftex.
21
22 The easiest way to use otftotfm is with the -a option; see Automatic
23 Mode below. Without -a, otftotfm writes all its output files to the
24 current directory.
25
26 After running "otftotfm fontfile texname" and installing the results
27 (manually or with -a), you can use the OpenType font in plain TeX with
28 a command like this:
29
30 \font\myfont=texname at 10pt
31 {\myfont This text uses the OpenType font.}
32
33 LaTeX users will generally make a ".fd" input file so that commands
34 like "\renewcommand{\rmdefault}{TeXName}" work correctly. See the
35 EXAMPLE section for more; check the DIAGNOSTICS and FREQUENTLY ASKED
36 QUESTIONS sections if you have trouble.
37
38 OpenType Features
39 OpenType fonts support optional features that change their appearance.
40 Use the -f option to turn on selected features. For example, "-fsmcp"
41 replaces lower-case letters with the corresponding small capitals, in
42 fonts that support this.
43
44 You'll generally provide at least the "-fkern" and "-fliga" options,
45 which activate pair kerns and f-ligatures. Other interesting features
46 include "-fcpsp", for capital spacing; "-fdlig", for optional liga‐
47 tures; "-flnum", "-fonum", "-fpnum", and "-ftnum", to control digit
48 glyphs; "-fsmcp", for small capitals; "-fswsh", for swash variants; and
49 "-fcswh", for contextual swash. See the FEATURE DIRECTORY section
50 below for more. The otfinfo(1) program will report which features a
51 font supports; run "otfinfo -f fontfile".
52
53 Feature options can also apply a feature to a subset of characters in
54 the font. For example, "--lf smcp" only replaces letters with small
55 capitals, whereas "-fsmcp" might additionally replace digits and punc‐
56 tuation marks with small-capital versions.
57
58 Automatic Mode
59 Automatic mode, triggered by the -a/--automatic option, installs font
60 metrics and encoding files where TeX can find them, and additionally
61 installs a Type 1 font and mapping for dvips(1). This requires a TeX
62 installation that follows the TeX Directory Structure standard
63 (http://www.tug.org/tds/), such as most Unix TeX installations.
64
65 Automatic mode should run seamlessly out of the box. Otftotfm will
66 install metrics files, encodings, map files, and Type 1 fonts into
67 $HOME/.texmf-var or any other writable TEXMF directory, and run
68 updmap(1) to update the global lists of installed fonts. (On older
69 teTeX installations, you may first need to copy the system's updmap.cfg
70 file to $HOME/texmf/web2c and run mktexlsr(1). On newer TeXLive
71 installations, you may need to set the TEXMFVAR environment variable.)
72 You can then run "otftotfm -a fontfile texname" and immediately refer
73 to the font in TeX using the texname you supplied. Again, you will
74 have to write ".fd" files and/or typescripts to make the font conve‐
75 niently accessible from LaTeX or ConTeXt. See the DIAGNOSTICS section
76 if you have problems with these instructions.
77
78 In automatic mode, otftotfm searches your $TEXMFVAR or $TEXMF path for
79 a writable directory, then installs files under that directory tree as
80 follows:
81
82 File type Directory Filename
83 TFM TEXMF/fonts/tfm/vendor/typeface/ texname[--base].tfm
84 VF TEXMF/fonts/vf/vendor/typeface/ texname.vf
85 PL TEXMF/fonts/pl/vendor/typeface/ texname[--base].pl
86 VPL TEXMF/fonts/vpl/vendor/typeface/ texname.vpl
87 encoding TEXMF/fonts/enc/dvips/vendor/ a_signature.enc
88 or TEXMF/dvips/vendor/
89 font map TEXMF/fonts/map/dvips/vendor/ vendor.map
90 or TEXMF/dvips/vendor/
91
92 "TEXMF" stands for the writable TEXMF directory. Texname is the font
93 name supplied as otftotfm's second argument. The vendor and typeface
94 strings are required by TDS; they default to "lcdftools" and the font's
95 family name, respectively, but see the --vendor and --typeface options.
96 Signature is an opaque 6-character encoding signature.
97
98 Otftotfm also installs a font file suitable for printing. PostScript-
99 flavored OpenType fonts are translated to Type 1 format and installed
100 as PFB fonts. TrueType-flavored fonts are normally installed as is,
101 since pdftex and pdflatex can read TrueType directly; but if you pro‐
102 vide the --type42 option, otftotfm will translate TrueType fonts to
103 Type 42 format, which dvips understands. Otftotfm does not overwrite
104 existing font files.
105
106 The installation paths are as follows, where PSname is the font's Post‐
107 Script name.
108
109 PFB TEXMF/fonts/type1/vendor/typeface/ PSname.pfb
110 TrueType TEXMF/fonts/truetype/vendor/typeface/ fontfile
111 Type 42 TEXMF/fonts/type42/vendor/typeface/ PSname.t42
112
113 You can override these directories with environment variables and
114 options as follows. Options take precedence over environment vari‐
115 ables.
116
117 File type Environment variable Option
118 TFM TFMDESTDIR --tfm-directory
119 VF VFDESTDIR --vf-directory
120 PL PLDESTDIR --pl-directory
121 VPL VPLDESTDIR --vpl-directory
122 encoding ENCODINGDESTDIR --encoding-directory
123 PFB T1DESTDIR --type1-directory
124 TrueType TRUETYPEDESTDIR --truetype-directory
125 Type 42 T42DESTDIR --type42-directory
126 font map - --map-file
127
128 Otftotfm will update the TEXMF/ls-R file when installing files under
129 TEXMF. It will also run the updmap(1) program after changing a map
130 file, unless the --no-updmap option was supplied. However, if an exe‐
131 cutable file called TEXMF/dvips/updmap exists, this file is executed
132 (from the TEXMF/dvips directory) rather than the global updmap. This
133 is so you can write a fast, customized version of updmap if desired.
134
136 This section uses MinionPro to show one way to install OpenType fonts
137 for LaTeX. We begin with six fonts: "MinionPro-Regular.otf", "Minion‐
138 Pro-It.otf", "MinionPro-Semibold.otf", "MinionPro-SemiboldIt.otf",
139 "MinionPro-Bold.otf", and "MinionPro-BoldIt.otf".
140
141 Our first task is to decide how to encode the fonts. The "encoding
142 scheme" is used by TeX to decide how to typeset accents and symbols
143 like "$". The "LY1" encoding scheme has reasonable accent support and
144 is a good choice for many OpenType fonts. LY1 corresponds to the "tex‐
145 nansx.enc" encoding file, so we will supply otftotfm with the "-e tex‐
146 nansx" option.
147
148 Expert note: Strictly speaking, LY1 corresponds to the "tex‐
149 nansi.enc" encoding file. Since the "texnansx.enc" version
150 omits duplicate characters, it has more room for font-specific
151 glyphs and is generally a better choice; but if you plan to type
152 characters like "ae" directly into your editor, rather than
153 using TeX commands like \ae, you should use "texnansi.enc".
154
155 Next, we decide on a naming scheme for the font metric files. Let's
156 use the OpenType font names as a base. (There's generally no need to
157 follow the six-character "Karl Berry" naming scheme.) Just in case we
158 come back later and add a different encoding scheme, we'll prepend
159 "LY1--" to each name.
160
161 We're now ready to run otftotfm for the first set of fonts. Note the
162 "-fkern -fliga" options, which access pair kerns and the default "f"
163 ligatures.
164
165 otftotfm -a -e texnansx MinionPro-Regular.otf \
166 -fkern -fliga LY1--MinionPro-Regular
167 otftotfm -a -e texnansx MinionPro-It.otf \
168 -fkern -fliga LY1--MinionPro-It
169 otftotfm -a -e texnansx MinionPro-Semibold.otf \
170 -fkern -fliga LY1--MinionPro-Semibold
171 otftotfm -a -e texnansx MinionPro-SemiboldIt.otf \
172 -fkern -fliga LY1--MinionPro-SemiboldIt
173 otftotfm -a -e texnansx MinionPro-Bold.otf \
174 -fkern -fliga LY1--MinionPro-Bold
175 otftotfm -a -e texnansx MinionPro-BoldIt.otf \
176 -fkern -fliga LY1--MinionPro-BoldIt
177
178 The small-caps fonts are generated with an additional "-fsmcp" option.
179 We append "--fsmcp" to the font metric names as well, differentiating
180 them from the regular fonts. Although MinionPro's italic fonts support
181 small-caps, the LaTeX font selection scheme can't access them easily,
182 so we've left them off.
183
184 otftotfm -a -e texnansx MinionPro-Regular.otf \
185 -fkern -fliga -fsmcp LY1--MinionPro-Regular--fsmcp
186 otftotfm -a -e texnansx MinionPro-Semibold.otf \
187 -fkern -fliga -fsmcp LY1--MinionPro-Semibold--fsmcp
188 otftotfm -a -e texnansx MinionPro-Bold.otf \
189 -fkern -fliga -fsmcp LY1--MinionPro-Bold--fsmcp
190
191 To get old-style numerals, just add the "-fonum" option to each invoca‐
192 tion -- and, to reduce confusion, append "--fonum" to the font metric
193 names.
194
195 At this point, all our font metric files are installed, and it's
196 finally time to create the ".fd" file. (The ".fd" format is documented
197 in The LaTeX Companion.) Let's call the LaTeX font family "MinionPro".
198 Then the ".fd" file is "LY1MinionPro.fd", and it contains:
199
200 \DeclareFontFamily{LY1}{MinionPro}{}
201 \DeclareFontShape{LY1}{MinionPro}{m}{n}%
202 { <-> LY1--MinionPro-Regular }{}
203 \DeclareFontShape{LY1}{MinionPro}{m}{it}{ <-> LY1--MinionPro-It }{}
204 \DeclareFontShape{LY1}{MinionPro}{m}{sc}%
205 { <-> LY1--MinionPro-Regular--fsmcp }{}
206 \DeclareFontShape{LY1}{MinionPro}{sb}{n}%
207 { <-> LY1--MinionPro-Semibold }{}
208 \DeclareFontShape{LY1}{MinionPro}{sb}{it}%
209 { <-> LY1--MinionPro-SemiboldIt }{}
210 \DeclareFontShape{LY1}{MinionPro}{sb}{sc}%
211 { <-> LY1--MinionPro-Semibold--fsmcp }{}
212 \DeclareFontShape{LY1}{MinionPro}{b}{n}{ <-> LY1--MinionPro-Bold }{}
213 \DeclareFontShape{LY1}{MinionPro}{b}{it}%
214 { <-> LY1--MinionPro-BoldIt }{}
215 \DeclareFontShape{LY1}{MinionPro}{b}{sc}%
216 { <-> LY1--MinionPro-Bold--fsmcp }{}
217 \DeclareFontShape{LY1}{MinionPro}{bx}{n}%
218 { <-> ssub * MinionPro/b/n }{}
219 \DeclareFontShape{LY1}{MinionPro}{bx}{it}%
220 { <-> ssub * MinionPro/b/it }{}
221 \DeclareFontShape{LY1}{MinionPro}{bx}{sc}%
222 { <-> ssub * MinionPro/b/sc }{}
223
224 We're now ready to use MinionPro in LaTeX, with lines like this in the
225 document preamble:
226
227 \usepackage[LY1]{fontenc}
228 \renewcommand{\rmdefault}{MinionPro}
229 \renewcommand{\bfdefault}{b}
230
231 Of course, we're free at any time to add more MinionPro variants with
232 otftotfm; they'll become accessible to LaTeX as soon as we edit the
233 "MinionPro.fd" file.
234
236 With long options, you need type only as many characters as will make
237 the option unique.
238
239 Font Feature and Transformation Options
240 -s script[.lang], --script=script[.lang]
241 Apply features suitable to the script system script and language
242 system lang. Scripts and language systems are two-to-four-letter
243 names assigned by Microsoft and Adobe. Examples include "latn"
244 (Latin script), "grek" (Greek script), and "yi.YIC" (Yi script
245 with classic characters). If lang is not specified, otftotfm will
246 use the default language system for that script. You can give
247 this option multiple times. Run "otfinfo -s font" to see the list
248 of scripts and languages a font supports. Defaults to "latn".
249
250 -f feature, --feature=feature
251 Activate the feature named feature. Features are four-letter
252 names assigned by Microsoft and Adobe; they are meant to corre‐
253 spond to font behaviors, such as kerning or small-capitals. Exam‐
254 ples include "liga" (default ligatures), "dlig" (discretionary
255 ligatures), "kern" (kerning), and "c2sc" (replacing capitals with
256 small capitals). Give this option multiple times to apply multi‐
257 ple features. Run "otfinfo -f [--script option] font" to see the
258 list of features a font supports for a specified script. Defaults
259 to any features required by the selected scripts.
260
261 --lf feature, --letter-feature=feature
262 Activate the feature named feature, but only for letters. For
263 instance, the "-f smcp" option will apply the small-caps feature
264 to all characters in the encoding; this may result in changes to
265 punctuation and numbers as well as letters. The "--lf smcp"
266 option will apply the small-caps feature only to letters, meaning
267 characters with the "Letter" Unicode property.
268
269 --subs-filter pattern
270 --include-subs pattern
271 --exclude-subs pattern
272 --clear-subs
273 Limit the characters that otftotfm will substitute. Substitution
274 is allowed on an input character if it matches at least one of the
275 --include patterns, and none of the --exclude patterns. Each pat‐
276 tern applies to all following features, except that the --clear
277 option clears any accumulated patterns. The --subs-filter pattern
278 option acts like --clear-subs followed by --include-subs pattern.
279 For pattern syntax, see GLYPH PATTERNS, below.
280
281 In the command line below, the '<Number>' pattern will force the
282 "onum" feature to substitute only numbers (and not, for example,
283 punctuation). The "salt" feature can still substitute any charac‐
284 ter.
285 otftotfm -fsalt --include-subs="<Number>" -fonum ...
286
287 -E fac, --extend=fac
288 Widen, or extend, the font by a factor of fac. Like afm2tfm(1)'s
289 -e option.
290
291 -S amt, --slant=amt
292 Oblique, or slant, the font by amt. Like afm2tfm(1)'s -s option.
293
294 -L amt, --letterspacing=amt
295 Letterspace each character by amt units, where 1000 units equals
296 one em. The width of each character increases by amt, with half
297 the space distributed to each sidebearing. Boundary-character
298 kerns are added to maintain alignment at the ends of lines.
299
300 --math-spacing[=skewchar]
301 Ignore the font's claimed character widths, deriving horizontal
302 metrics from bounding boxes instead. This results in similar
303 spacing as the Computer Modern Math Italic font, with increased
304 sidebearings for letters like f and j.
305
306 If you provide skewchar, a number between 0 and 255 or a single
307 character, then otftotfm adds heuristically-derived kerns to the
308 font that may improve accent positions in math mode. To get the
309 benefits, you must tell TeX about the skewchar with a command like
310 "\skewchar\font=skewchar".
311
312 -k N, --min-kern=N
313 Only output kerning pairs whose absolute value is N or larger.
314 Larger minimum kerns make kerning less precise, but shrink the
315 output TFM file. The default minimum kern is 2.0, or 0.002 em.
316
317 --space-factor=fac
318 Scale the width of the inter-word space by a factor of fac.
319
320 --design-size=size
321 Set the output font's design size to size, a value in TeX points.
322 This value is mostly just documentation, since LaTeX essentially
323 ignores fonts' design sizes, but plain TeX may occasionally use
324 the design size to decide how large a font should be. (Loading a
325 font in TeX "at" a particular size effectively ignores the design
326 size; loading a font plain or "scaled" by a given factor uses the
327 design size.) The default is taken from the input font's optical
328 size feature, or 10pt if it has no such feature.
329
330 --fixed-width
331 Set the font to fixed-width (its space character will have no
332 stretch or shrink). Normally you won't need this option; the font
333 will tell otftotfm whether it is fixed width. The opposite of
334 --fixed-width is --proportional-width.
335
336 --italic-angle=angle
337 Set the output font's default italic angle to angle, a number of
338 degrees. This value is used by TeX to position accents. Normally
339 you won't need this option; the font will tell otftotfm its italic
340 angle.
341
342
343 --x-height=val
344 Set the output font's x-height to val. This value is used by TeX
345 to position accents. Normally you won't need this option. Val may
346 be a number expressed in font units; ‘x’, which uses the height of
347 the font's lowercase x; or ‘font’, which uses the font's declared
348 x-height metric.
349
350 Encoding Options
351 -e encoding, --encoding=encoding
352 Select the output metrics's base dvips(1) encoding. Otftotfm will
353 search for encoding[.enc] the same way that dvips would, so you
354 may not need to give a full pathname. Say -e - to start with the
355 font's default encoding. See ENCODINGS, below, for more informa‐
356 tion.
357
358 --boundary-char=char
359 Set the font's boundary character to char, which should either be
360 a single non-digit character, or a number between -1 and 255. The
361 default is taken from the encoding.
362
363 --altselector-char=char
364 Set the font's alternate selector character to char, which should
365 either be a single non-digit character, or a number between -1 and
366 255. Alternate selectors let TeX authors explicitly choose
367 between versions of a character. For instance, the '--altselec‐
368 tor-char="*"' option turns the "*" character into a special switch
369 that cycles between alternates. For instance, the TeX input "A"
370 would produce the normal version of the "A" Unicode character,
371 "A*" would produce the first alternate, "A**" would produce the
372 second alternate, and so forth. Furthermore, "s*t" will activate
373 any discretionary "s_t" ligature in the font.
374
375 The --altselector-char mechanism uses the features specified by
376 --altselector-feature options.
377
378 The alternate-selector character may also be specified in the
379 encoding; see ENCODINGS, below. See Sivan Toledo's article cited
380 in the SEE ALSO section for more information.
381
382 --altselector-feature=feature
383 Activate the feature named feature for the --altselector-char
384 mechanism. Give this option multiple times to activate multiple
385 features. This option activates features only for use with --alt‐
386 selector-char; use the --feature option to activate features glob‐
387 ally. Defaults to the salt and dlig features.
388
389 --alternates-filter=pattern
390 --include-alternates=pattern
391 --exclude-alternates=pattern
392 --clear-alternates
393 Limit the alternate characters that otftotfm will select. An
394 alternate is used if it matches at least one of the --include pat‐
395 terns, and none of the --exclude patterns. Each pattern applies
396 to all following features, except that the --clear option clears
397 any accumulated patterns. The --alternates-filter pattern option
398 acts like --clear-alternates followed by --include-alternates pat‐
399 tern. For pattern syntax, see GLYPH PATTERNS, below.
400
401 OpenType fonts can have many alternates per character, most of
402 which aren't interesting. For example, the character "a" in
403 WarnockPro-Regular has five alternates, "ordfeminine", "Asmall",
404 "asuperior", "a.end", and "orn.013". The --altselector-char
405 option lets you cycle through these alternates, but it's better to
406 leave out the ones you don't want, to avoid overfull encodings.
407 Thus, if you were only interested in ".end" variants, you might
408 supply an '--include-alternates="*.end"' option.
409
410 In the command line below, the '*.end' pattern will apply to
411 "aalt" alternates, but not to "salt" alternates.
412 otftotfm -fsalt --include-alternates="*.end" -faalt ...
413
414 --ligkern=command
415 Add a LIGKERN command to the encoding. For example, '--ligkern "T
416 {L} h"' suppresses any T_h ligature in the font. You can supply
417 multiple --ligkern options. See ENCODINGS, below.
418
419 --position=command
420 Add a POSITION command to the encoding. For example, '--position
421 "T 10 0 20"' adds ten units of space to either side of the "T"
422 character. You can supply multiple --position options. See
423 ENCODINGS, below.
424
425 --unicoding=command
426 Add a UNICODING command to the encoding. For example, '--unicod‐
427 ing "pi1 =: uni03D6"' tells otftotfm to encode "/pi1" as U+03D6
428 GREEK PI SYMBOL. You can supply multiple --unicoding options.
429 See ENCODINGS, below.
430
431 --no-encoding-commands
432 Ignore any LIGKERN and/or UNICODING commands in the encoding file.
433
434 --no-default-ligkern
435 Don't include otftotfm's default LIGKERN commands.
436
437 --coding-scheme=scheme
438 Add a CODINGSCHEME to the encoding. See ENCODINGS, below.
439
440 --warn-missing
441 Warn about encoded characters not supported by the font. See the
442 WARNMISSING command in ENCODINGS, below.
443
444 --literal-encoding=encoding
445 Select the dvips(1) encoding used for the font. No glyph substi‐
446 tutions will be permitted, so the output encoding will equal the
447 input encoding (and otftotfm will not generate an output encod‐
448 ing).
449
450 --base-encodings=file
451 Experts only. Allow the output font to refer to existing "base"
452 fonts. This can greatly reduce the number of base fonts generated
453 by otftotfm. Each line in the file argument contains a TeX font
454 name (as for --name) and a corresponding literal encoding file (as
455 for --literal-encoding); for example:
456 WarnoProReg--eka eka
457 WarnoProReg--exp1 exp1
458 The named fonts must have been created by prior runs of otftotfm
459 on the same input OpenType font, with the same --extend and
460 --slant options as the current run. The current output font will
461 refer to glyphs from the named base fonts when possible. If the
462 base fonts cover all glyphs required by the output font, otftotfm
463 won't generate any new base fonts at all. The file can also refer
464 to dotless-J fonts using the following syntax:
465 WarnoProReg--lcdfj - dotlessj
466
467 Automatic Mode Options
468 -a, --automatic
469 Select automatic mode.
470
471 -v vendor, --vendor=vendor
472 Set the font vendor name, which is used to locate files within the
473 TDS. Defaults to "lcdftools".
474
475 In automatic mode, TeX and friends will generally find required
476 font files independently of the vendor you select.
477
478 --typeface=typeface
479 Set the font typeface name, which is used to locate files within
480 the TDS. Defaults to the current font's family name with
481 unsuiable characters removed.
482
483 --no-type1
484 Do not use cfftot1(1) to create Type 1 fonts corresponding to the
485 OpenType input fonts.
486
487 --no-dotlessj
488 Do not use t1dotlessj(1) to create a special dotless-j font when
489 the input font doesn't have dotless-j.
490
491 --no-truetype
492 Do not install TrueType-flavored fonts.
493
494 --type42
495 Install TrueType-flavored fonts in translated Type 42 format.
496
497 --no-updmap
498 Do not run an updmap(1) program. This can be useful if you're
499 installing a bunch of fonts; it is much faster to run updmap once,
500 at the end, than to run it once per font.
501
502 Output Options
503 -n texname, --name=texname
504 Set the TeX name of the output font, which is used in font map
505 files and, in automatic mode, to generate the output filename.
506 The default is derived from the OpenType font's name and the fea‐
507 tures you selected.
508
509 -p, --pl
510 Output human-readable PL and VPL metrics, not binary TFM and VF
511 metrics. Note: Otftotfm's PL and VPL output files are legal, but
512 the fontinst program may not accept them (it has a picky parser).
513 Make sure to supply a --coding-scheme; if that doesn't help, run
514 the TFM output through tftopl(1).
515
516 --no-virtual
517 Do not generate virtual fonts (VFs and VPLs). Otftotfm will warn
518 if the selected font features cannot be implemented without vir‐
519 tual fonts.
520
521 --no-encoding
522 Do not generate an encoding file.
523
524 --output-encoding[=file]
525 Only generate an encoding file; do not generate any other output.
526 The encoding file is written to file, or to standard output if no
527 file argument is supplied.
528
529 --no-map
530 Do not generate a font map line for the font.
531
532 File Location Options
533 --tfm-directory=dir
534 --pl-directory=dir
535 --vf-directory=dir
536 --vpl-directory=dir
537 --encoding-directory=dir
538 --type1-directory=dir
539 --truetype-directory=dir
540 --type42-directory=dir
541 --directory=dir
542 Set the directory used for various output types. Each directory
543 may be set by an environment variable, and defaults to a TDS
544 directory in automatic mode, or to "." otherwise. Environment
545 variable names and default TDS locations are described in the
546 Automatic Mode section above. The --directory option sets the
547 default directory for all output types.
548
549 --map-file=filename
550 Set file in which otftotfm will write a font map line for the
551 font. The default is the standard output in manual mode, and
552 "TEXMF/fonts/map/dvips/vendor/vendor.map" (or "TEXMF/dvips/ven‐
553 dor/vendor.map" on older installations) in automatic mode.
554
555 Miscellaneous Options
556 --glyphlist=file
557 Use file as a Adobe glyph list, which helps translate glyph names
558 to Unicode code points. Give multiple options to include multiple
559 files. See ENCODINGS, below, for more information.
560
561 -V, --verbose
562 Write progress messages to standard error.
563
564 --no-create
565 Do not create or modify any files. Instead, write messages about
566 the program's hypothetical progress to standard error.
567
568 --force
569 Generate all files, even if it looks like versions are already
570 installed.
571
572 -q, --quiet
573 Do not generate any error messages.
574
575 --kpathsea-debug=flags
576 Set path searching debugging flags. See the Kpathsea manual for
577 details.
578
579 -h, --help
580 Print usage information and exit.
581
582 --version
583 Print the version number and some short non-warranty information
584 and exit.
585
587 Otftotfm interprets encoding files as Unicode. For example, say an
588 input encoding has "/dotlessi" at position 10. Otftotfm detects that
589 position 10 should contain Unicode character U+0131 LATIN SMALL LETTER
590 DOTLESS I, and uses the font's glyph for that character (possibly modi‐
591 fied by any active features). The selected glyph might not be named
592 "dotlessi"; only the Unicode value matters.
593
594 Otftotfm assigns Unicode values to glyph names using a table published
595 by Adobe (SEE ALSO has a reference), with extensions for TeX. For more
596 fine-grained control, add UNICODING commands to the input encoding
597 file. These commands have the following format:
598 % UNICODING glyph =: choice1 [choice2 ...] ;
599 This tells otftotfm that the glyph named glyph translates into the
600 first Unicode value in the choice list that has a character in the
601 font. Glyph and the choices are PostScript glyph names; the initial
602 "%" sign is required; and each UNICODING line can contain multiple com‐
603 mands, separated by spaced semicolons. For example,
604 % UNICODING pi1 =: uni03D6 ;
605 encodes the character "/pi1" as U+03D6 GREEK PI SYMBOL, and
606 % UNICODING Delta =: uni0394 uni2206 ;
607 makes U+0394 GREEK CAPITAL LETTER DELTA preferred to U+2206 INCREMENT
608 as an encoding for "/Delta". You can also supply glyph names:
609 % UNICODING Delta =: Deltagreek Delta ;
610 A mapping with no Unicode values removes that glyph from the input
611 encoding. For instance, this erases any f-ligature characters from the
612 encoding:
613 % UNICODING ff =: ; fi =: ; fl =: ; ffi =: ; ffl =: ;
614 The slots are available for otftfm's own use, for example for other
615 characters required by the font. (If the f-ligatures themselves are
616 required by the font, for instance by a 'liga' feature, then they will
617 be stored into their old slots when possible.) Map a glyph to 'emptys‐
618 lot' if you don't want otftotfm to use the slot. For example, this
619 will leave the 'ff' slot unused if the font has no 'ff' glyph:
620 % UNICODING ff =: ff emptyslot ;
621 (Note that most OpenType fonts provide a visible representation for
622 unused encoding slots, namely a box with an X inside.)
623
624 LIGKERN comments in the encoding can add ligatures and inhibit kerns,
625 as in afm2tfm(1). To add a ligature, say:
626 % LIGKERN glyph1 glyph2 =: result ;
627 The "=:" operator indicates a normal ligature, where both the input
628 glyphs are removed and replaced by result. To preserve the left-hand
629 glyph, for an effect like "glyph1 glyph2 =: glyph1 result", use "|=:"
630 instead; to preserve the right-hand glyph, use "=:|". To remove all
631 kerns between two characters, say:
632 % LIGKERN glyph1 {} glyph2 ;
633 A "*" matches any character, so
634 % LIGKERN a {} * ;
635 removes all kerns with "a" as the left-hand character, and
636 % LIGKERN * {} * ;
637 removes all kerns.
638
639 Otftotfm also supports extended syntax for setting kern values and
640 inhibiting ligatures. To add an n-unit kern between two glyphs, say:
641 % LIGKERNX glyph1 {n} glyph2 ;
642 where n is an integer. This:
643 % LIGKERNX glyph1 {L} glyph2 ;
644 inhibits any ligature between glyph1 and glyph2. "{LK}" and "{KL}"
645 inhibit both ligatures and kerns.
646
647 You can set the --boundary-char and --altselector-char from an encoding
648 file with commands like this:
649 % LIGKERN || = boundarychar ;
650 % LIGKERNX ^^ = altselectorchar ;
651 As with UNICODING, each LIGKERN or LIGKERNX line can contain multiple
652 commands, separated by spaced semicolons.
653
654 Otftotfm has a default set of eight ligatures, namely:
655 space l =: lslash ; space L =: Lslash ;
656 question quoteleft =: questiondown ; exclam quoteleft =: exclamdown ;
657 hyphen hyphen =: endash ; endash hyphen =: emdash ;
658 quoteleft quoteleft =: quotedblleft ;
659 quoteright quoteright =: quotedblright
660 LIGKERN commands in the encoding file and --ligkern options can over‐
661 ride these defaults, or supply the --no-default-ligkern option to turn
662 them off.
663
664 The POSITION command shifts a glyph within its bounding box. The syn‐
665 tax is
666 % POSITION glyph pdx pdy adx ;
667 This will add pdx units of space to glyph's left edge; raise it up by
668 pdy units; and add adx units to its width. For example, to add 10
669 units of space to either side of the "T" glyph, supply
670 % POSITION T 10 0 20
671 To move the "degree" symbol up by 20 units, supply
672 % POSITION degree 0 20 0
673
674 The CODINGSCHEME command specifies the coding scheme for fonts using
675 this encoding. This is a string, less than 40 characters long and con‐
676 taining no parentheses, that classifies the encoding for TeX's pur‐
677 poses. Sample coding schemes include "TEX TEXT", "TEX MATH ITALIC",
678 and "EXTENDED TEX FONT ENCODING - LATIN". For example:
679 % CODINGSCHEME EXTENDED TEX FONT ENCODING - LATIN
680 Most tools ignore the coding scheme; fontinst is an exception.
681 Otftotfm uses the encoding's PostScript name for the default coding
682 scheme.
683
684 Finally, the WARNMISSING command makes any glyphs not supported by the
685 input font appear as black boxes. The dvips(1) processor will also
686 print a warning when encountering these glyphs. For example:
687 % WARNMISSING yes
688
689 The --unicoding, --ligkern, --position, --coding-scheme, and
690 --warn-missing options add UNICODING, LIGKERN/LIGKERNX, POSITION, COD‐
691 INGSCHEME, and WARNMISSING commands to an encoding, and can override
692 commands in the encoding itself. Some common encoding files have com‐
693 mands that are inappropriate for OpenType fonts; for example, "t1.enc"
694 hard-codes f-ligatures, which can cause problems with small-cap fonts.
695 Supply the --no-encoding-commands option to ignore all commands from
696 the encoding file. Commands from options like --ligkern are processed
697 in any case.
698
699 New Glyphs
700 New glyphs, such as ligatures and contextual substitutions, are added
701 to the encoding in any empty spaces, using their original locations
702 when possible. If the encoding doesn't have enough space for all new
703 glyphs, shorter ligatures composed of unaccented letters get prece‐
704 dence.
705
706 Synthetic Glyphs
707 Otftotfm can synthesize some glyphs using virtual font manipulations,
708 if a required glyph is not available in the input font. Specifically,
709 it will synthesize:
710
711 cwm TeX's compound word mark (a zero-width "strut"
712 rule with height equal to the font's x-height)
713 ascendercompwordmark "cwm" with height equal to the font's ascenders
714 capitalcompwordmark "cwm" with height equal to the font's capitals
715 visualspace A square cup used to represent spaces
716 dotlessj A dotless "j", synthesized with t1dotlessj(1)
717 dblbracketleft Kerned version of "[["
718 dblbracketright Kerned version of "]]"
719 bardbl The parallel symbol "||"
720 asteriskmath Vertically-centered "*"
721 ringfitted Ring accent centered on the width of "A"
722 twelveudash 2/3-em-wide dash
723 threequartersemdash 3/4-em-wide dash
724 centigrade "(degrees)C"
725 interrobang Combined "?!" symbol
726 interrobangdown Inverted interrobang
727 pertenthousand Per-ten-thousand sign (% with two extra 0s)
728 IJ "IJ" ligature
729 ij "ij" ligature
730 Germandbls "SS" (a capital sharp-s)
731 SSsmall Small-capital version of "SS"
732 FFsmall Small-capital version of "FF"
733 FIsmall Small-capital version of "FI"
734 FLsmall Small-capital version of "FL"
735 FFIsmall Small-capital version of "FFI"
736 FFLsmall Small-capital version of "FFL"
737
739 The --include-subs and --include-alternates options, and their
740 --exclude and --*-filter variants, accept the following types of pat‐
741 tern.
742
743 · Glyph names. Example: "Aacute". For PostScript-flavored fonts, use
744 otfinfo(1)'s -g option to see a font's glyph names, and "cfftot1
745 font.otf | t1testpage" to generate a PostScript file showing each
746 glyph.
747
748 · Glyph name patterns using the shell-style glob-matching rules: "*"
749 matches any number of characters, "?" matches any single character,
750 and "[...]" matches any character in a set. Example: "*.end".
751
752 · Unicode category properties in angle brackets. Examples: "<Let‐
753 ter>", "<UppercaseLetter>", "<Lu>". The complete list of both short
754 and long names: Letter/L, UppercaseLetter/Lu, LowercaseLetter/Ll,
755 TitlecaseLetter/Lt, ModifierLetter/Lm, OtherLetter/Lo; Number/N,
756 DecimalNumber/Nd, LetterNumber/Nl, OtherNumber/No; Punctuation/P,
757 ConnectorPunctuation/Pc, DashPunctuation/Pd, OpenPunctuation/Ps,
758 ClosePunctuation/Pe, InitialPunctuation/Pi, FinalPunctuation/Pf,
759 OtherPunctuation/Po; Symbol/S, MathSymbol/Sm, CurrencySymbol/Sc,
760 ModifierSymbol/Sk, OtherSymbol/So; Mark/M, SpacingMark/Mc, Enclos‐
761 ingMark/Me, NonspacingMark/Mn; Separator/Z, SpaceSeparator/Zs, Line‐
762 Separator/Zl, ParagraphSeparator/Zp; Other/C, Surrogate/Cs, For‐
763 mat/Cf, Control/Cc, PrivateUse/Co, Unassigned/Cn. Category values
764 current as of Unicode 4.0.
765
766 · Unicode ranges. Example: "U+007f-U+008C".
767
768 The "!" prefix negates a pattern, and you can separate multiple pat‐
769 terns by spaces.
770
772 This section lists features common to Western OpenType fonts and
773 describes how otftotfm handles them for common fonts. Please send the
774 author mail if otftotfm does not handle a feature you need, or you
775 believe it handles some feature incorrectly.
776
777 aalt, Access All Alternates
778 Lets the user choose between all available alternate forms for a
779 character. This includes things like superscript and subscript
780 variants, different styles (swash, for example), and even orna‐
781 ments. The --altselector-feature=aalt option can help an --altse‐
782 lector-char provide useful access to alternates, but the aalt fea‐
783 ture isn't usually useful on its own. Try the salt and calt fea‐
784 tures instead.
785 c2sc, Small Capitals From Capitals
786 Replaces capital letters with small capitals: a sort of converse
787 of the more conventional smcp feature, which replaces lower-case
788 letters with small capitals. Supported.
789 calt, Contextual Alternates
790 Lets the user choose between context-appropriate swash forms for
791 each character. For example, given the word "DREW" in a cursive
792 typeface, the "R E W" might be translated to calmer forms than the
793 initial "D". There may be more than one choice for a given let‐
794 ter, in which case the user should be able to select among them.
795 TeX can't support complex contextual alternates, or alternate
796 selection, but otftotfm supports some fonts quite well. The input
797 encoding should have lots of empty space for variants, and it
798 should specify a boundary character. See also cswh.
799 case, Case-Sensitive Forms
800 Shifts punctuation marks up to a position that works well with
801 all-capital-letter sequences. For example, the hyphen character,
802 which generally centers vertically on the x-height, is raised up
803 to center vertically on a capital letter. Also replaces text fig‐
804 ures with lining figures, and accent marks with forms more appro‐
805 priate for capitals. Supported.
806 cpsp, Capital Spacing
807 Adds a bit of space on either side of each capital letter. Sup‐
808 ported. (However, the OpenType tag registry suggests that cpsp be
809 on by default, but applying to all-caps text only; TeX cannot eas‐
810 ily implement that contextual intelligence.)
811 cswh, Contextual Swash
812 Lets the user choose between context-appropriate swash forms for
813 each character. For example, in the words "Ab AC", the first "A"
814 might be translated to a swash form, while the second might not.
815 There may be more than one choice for a given letter, in which
816 case the user should be able to select among them. Otftotfm sup‐
817 ports some fonts quite well. The input encoding should have lots
818 of empty space for swash variants, and it should specify a bound‐
819 ary character. See also calt and swsh.
820 dlig, Discretionary Ligatures
821 Activates uncommon ligatures, such as "c_t", "s_p", and "s_t".
822 Supported.
823 dnom, Denominators
824 Replaces digits and some punctuation marks with smaller forms sit‐
825 ting on the baseline, intended for fraction denominators. Sup‐
826 ported.
827 fina, Terminal Forms
828 Substitutes appropriate forms for letters occurring at the ends of
829 words. This feature doesn't select swash variants; it's intended
830 for normal use, and the specification recommends that it be on by
831 default. Partially supported: TeX will only treat spaces as the
832 ends of words, where a correct implementation would probably
833 include punctuation too. See cswh for selecting swash variants
834 active at the ends of words.
835 frac, Fractions
836 Replaces simple sequences like "1/2" with nice-looking fractions.
837 Supported, but beware: many fonts will translate "11/32" into "1"
838 + "1/3" + "2".
839 hist, Historical Forms
840 Replaces characters with historical variants. Usually, this means
841 at least translating regular "s" to long "s". Supported.
842 kern, Kerning
843 Adjusts the space between characters (pair kerning). Generally
844 supported, and you should probably turn it on. As a special case,
845 "-fkern" can also read kerning information from the "kern" table
846 in conventional TrueType fonts.
847 liga, Standard Ligatures
848 Activates common ligatures, such as "f_f", "f_i", "f_f_j", and (in
849 some Adobe fonts) "T_h". Generally supported, and you should
850 probably turn it on.
851 lnum, Lining Figures
852 Uses lining figures, the set of digits that are all about as high
853 as capital letters. Supported. Compare onum; see also pnum and
854 tnum.
855 numr, Numerators
856 Replaces digits and some punctuation marks with smaller, raised
857 forms intended for fraction numerators. Supported, but not usu‐
858 ally useful.
859 onum, Oldstyle Figures
860 Uses old-style figures, also known as text figures. This is the
861 set of digits that have ascenders and descenders like lower-case
862 letters. Supported. Compare lnum; see also pnum and tnum.
863 ordn, Ordinals
864 Designed for Spanish and French. Replaces ordinal numbers, such
865 as "2.o", with forms where the "o" is raised, and replaces the
866 sequence "No" with an integrated glyph. Supported.
867 ornm, Ornaments
868 Replaces some alphabetic characters in the font with ornaments,
869 and links the bullet character to a set of all bullet-like orna‐
870 ments, from which the user can choose. Partially supported: TeX
871 can handle alphabetic substitutions, but not bullet choice.
872 pnum, Proportional Figures
873 Digits will have different widths. Supported. Compare tnum; see
874 also lnum and onum.
875 salt, Stylistic Alternates
876 Lets the user choose between stylistic alternate forms for a char‐
877 acter. The --altselector-char mechanism provides useful access to
878 this feature. If you turn on salt globally, otftotfm takes the
879 first alternate form whenever there's more than one choice. See
880 also aalt and ss01; salt is generally more useful than aalt for
881 TeX, since it refers exclusively to stylistic alternates.
882 sinf, Scientific Inferiors
883 Replaces digits and some punctuation marks with smaller, lowered
884 forms intended for subscripts. Supported. Compare subs.
885 size, Optical Size
886 This feature stores information about the range of optical sizes
887 for which the font was intended. There is no point in selecting
888 it with otftotfm, since it should not change the font's appearance
889 in any way.
890 smcp, Small Capitals
891 Replaces lower-case letters with small capitals. Supported. Com‐
892 pare c2sc.
893 ss01-ss20, Stylistic Sets 1-20
894 Replaces characters with a uniform set of stylistic alternates.
895 Differs from features like salt in that a Stylistic Set is uni‐
896 form: an ssXX feature should never involve selection from a set of
897 possible alternate characters. Supported.
898 subs, Subscript
899 Replaces characters with smaller, lowered forms intended for sub‐
900 scripts. Supported. Compare sinf; some fonts support sinf but
901 not subs.
902 sups, Superscript
903 Replaces digits, some punctuation marks, and some lower-case let‐
904 ters with smaller, raised forms intended for superscripts. Sup‐
905 ported.
906 swsh, Swash
907 Activates all swash forms for each character. There may be more
908 than one swash form, in which case otftotfm will pick the first
909 one listed. Supported, except that swash variants other than the
910 first are inaccessible. Note that some fonts with swash variants
911 support the cswh feature exclusively.
912 tnum, Tabular Figures
913 All digits will have the same width, so that tables and the like
914 will align visually. Supported. Compare pnum; see also lnum and
915 onum.
916 zero, Slashed Zero
917 Replaces the zero character with a slashed zero. Supported.
918
920 no writable directory found in $TEXMF
921 Otftotfm could not find a writable directory in your $TEXMFVAR or
922 $TEXMF path. Did you create a $HOME/.texmf-var or $HOME/texmf
923 directory? If so, run the command "kpsewhich
924 --expand-path='$TEXMF'" to verify that directory is not being
925 found. You may need to set your TEXMF environment variable, to
926 '{!!'"$HOME"'/texmf,!!$TEXMFMAIN}', for instance (note the differ‐
927 ent kinds of quotes; on my machine, this expands to
928 '{!!/home/kohler/texmf,!!$TEXMFMAIN}').
929
930 'char' has no encoding, ignoring kern removal
931 (or ligature removal, lig/kern removal, or ligature)
932 These messages indicate a slight problem with your encoding file:
933 one of the LIGKERN commands referred to a character not present in
934 the encoding. This might be due to a misspelling in the LIGKERN
935 command or the encoding file, or it might be an oversight. Either
936 fix the encoding file or ignore the warning.
937
938 can't map 'char' to Unicode
939 Another encoding file problem: One of the glyph names in an UNI‐
940 CODING block could not be converted to Unicode. This is problem‐
941 atic since UNICODING exists wholly to translate glyph names into
942 Unicode. Fix the encoding file or ignore the warning.
943
944 not enough room in encoding, ignoring N glyph(s) ...
945 There wasn't space in the encoding for all the glyphs referred to
946 by the features you selected. For example, maybe the font had
947 more ligatures than there were empty slots in the encoding. Fix
948 this warning by selecting fewer features, or by using an encoding
949 with more empty slots, such as the 7t.enc encoding distributed
950 with otftotfm.
951
952 The '-a' option did not install my font correctly.
953 Try again with the '--verbose' option, which causes otftotfm to
954 explain its behavior. Note that by default, otftotfm will not re-
955 install files already present in your system's TeX search paths
956 (in the current directory, for instance). Use '--force' to over‐
957 ride this behavior.
958
960 How can I get a small-caps "SS" in place of the German sharp-S?
961 Supply the option '--unicoding "germandbls =: SSsmall"'.
962
963 How can I prevent f-ligatures from forming in a small-caps font?
964 This should happen automatically, but some overzealous encoding
965 files add f-ligatures even when the font doesn't request them.
966 Try the "--no-encoding-commands" option if this is a problem for
967 you.
968
969 Otftotfm seems to take a long time.
970 Use the -V option to see what it's doing. Often the culprit is
971 the updmap(1) program; if you're planning to run otftotfm multiple
972 times, give it the --no-updmap option and run updmap manually when
973 you're done.
974
975 How can I refer to the different forms of phi?
976 Otftotfm follows TeX practice and widely-distributed TeX encoding
977 vectors, so "/phi" in an input encoding vector should map to a
978 "straight" phi and "/phi1" should map to a "loopy" phi. Note that
979 TeX practice differs from the PostScript standard naming conven‐
980 tions, in which "/phi" is "loopy" and "/phi1" is "straight"; this
981 means that otftotfm may map "/phi" in an input encoding vector to
982 a font's "/phi1" glyph, and vice versa. Perhaps most unambigu‐
983 ously, you can use "/uni03D5" for the "straight" form and
984 "/uni03C6" for the "loopy" form.
985
986 How can I get lining figures (that is, normal line-height digits) with
987 small caps ('-fsmcp')?
988 Many fonts use old-style figures by default with small caps. Since
989 the default is not specified, it's wise to explicitly supply
990 '-flnum' or '-fonum'.
991
993 See the documentation for --pl above if you have problems running
994 otftotfm's output through fontinst.
995
997 pltotf(1), tftopl(1), vptovf(1), afm2tfm(1), dvips(1), cfftot1(1),
998 otfinfo(1), t1dotlessj(1), t1testpage(1), ttftotype42(1), kpsewhich(1),
999 updmap(1)
1000
1001 Adobe Type 1 Font Format
1002
1003 Adobe Technical Notes #5176, The Compact Font Format Specification, and
1004 #5177, The Type 2 Charstring Format
1005
1006 OpenType Specification, Version 1.4
1007
1008 A Directory Structure for TeX Files, http://www.tug.org/tds/
1009
1010 Kpathsea: A library for path searching, http://www.tug.org/kpathsea/
1011
1012 Sivan Toledo, Exploiting Rich Fonts, TUGboat 21(2), 2000,
1013 http://www.tug.org/TUGboat/Articles/tb21-2/tb67tole.pdf
1014
1015 Michel Goossens, Frank Mittelbach, and Alexander Samarin, The LaTeX
1016 Companion (for information on the .fd file format)
1017
1018 Adobe Systems, "Unicode and Glyph Names". Refers to the glyphlist.txt
1019 file used to translate glyph names to Unicode code points.
1020 http://partners.adobe.com/public/developer/opentype/index_glyph.html
1021
1023 Eddie Kohler (ekohler@gmail.com)
1024
1025 Thanks to Karl Berry, Marco Kuhlmann, Adam Lindsay, Bruce D'Arcus,
1026 Thomas Esser, Claire Connelly, Nelson H.F. Beebe, and Ryuji Suzuki for
1027 suggestions, bug reports, and help. Particular thanks to Achim Blumen‐
1028 sath and Michael Zedler for suggestions and patches, some of them
1029 extensive.
1030
1031
1032
1033Version 2.108 LCDF Typetools OTFTOTFM(1)