Debian Codegraph @

texk/lcdf-typetools/lcdf-typetools-src/otftotfm/otftotfm.1

raw
1 '\"t
2 .ds V 2.110
3 .de M
4 .BR "\\$1" "(\\$2)\\$3"
5 ..
6 .de Sp
7 .if n .sp
8 .if t .sp 0.4
9 ..
10 .de Bp
11 .IP \(bu 3n
12 ..
13 .TH OTFTOTFM 1 "LCDF Typetools" "Version \*V"
14 .SH NAME
15 otftotfm \- create TeX font metrics from OpenType fonts
16 .SH SYNOPSIS
17 .B otftotfm
18 \%[\fB\-a\fR]
19 \%[\fBoptions\fR]
20 \%\fIfontfile\fR [\fItexname\fR]
21 '
22 .SH DESCRIPTION
23 .BR Otftotfm
24 creates the font metric and encoding files required to use an OpenType font
25 with TeX. You supply an OpenType ".otf" or ".ttf" font file,
26 a base ".enc" encoding,
27 and a TeX name "\fItexname\fR" for the resulting font, and say which
28 OpenType features should be turned on. Then
29 .B otftotfm
30 generates and installs the corresponding TeX-related metric files (".tfm"
31 TeX font metrics, ".vf" virtual fonts, and ".enc" encoding files). It
32 works on both PostScript-flavored and TrueType-flavored OpenType fonts,
33 although TrueType-flavor support will only work easily with pdftex.
34 .LP
35 The easiest way to use
36 .B otftotfm
37 is with the
38 .B \-a
39 option; see Automatic Mode below. Without
40 .BR \-a ,
41 .B otftotfm
42 writes all its output files to the current directory.
43 .LP
44 After running "\fBotftotfm\fR \fIfontfile\fR \fItexname\fR" and
45 installing the results (manually or with
46 .BR \-a ),
47 you can use the OpenType font in plain TeX with a command like this:
48 .Sp
49 .nf
50 \efont\emyfont=\fItexname\fR at 10pt
51 {\emyfont This text uses the OpenType font.}
52 .fi
53 .Sp
54 LaTeX users will generally make a ".fd" input file so that commands like
55 "\erenewcommand{\ermdefault}{TeXName}" work correctly. See the EXAMPLE
56 section for more; check the DIAGNOSTICS and FREQUENTLY ASKED QUESTIONS
57 sections if you have trouble.
58 '
59 .SS "OpenType Features"
60 .LP
61 OpenType fonts support optional
62 .I features
63 that change their appearance. Use the
64 .B \-f
65 option to turn on selected features. For example, "\fB\-f\fRsmcp" replaces
66 lower-case letters with the corresponding small capitals, in fonts that
67 support this.
68 '
69 .PP
70 You'll generally provide at least the "\fB\-f\fRkern" and "\fB\-f\fRliga"
71 options, which activate pair kerns and f-ligatures. Other interesting
72 features include "\fB\-f\fRcpsp", for capital spacing; "\fB\-f\fRdlig", for
73 optional ligatures; "\fB\-f\fRlnum", "\fB\-f\fRonum", "\fB\-f\fRpnum", and
74 "\fB\-f\fRtnum", to control digit glyphs; "\fB\-f\fRsmcp", for small
75 capitals; "\fB\-f\fRswsh", for swash variants; and "\fB\-f\fRcswh", for
76 contextual swash. See the FEATURE DIRECTORY section below for more. The
77 .M otfinfo 1
78 program will report which features a font supports; run "\fBotfinfo\fR
79 \fB\-f\fR \fIfontfile\fR".
80 '
81 .PP
82 Feature options can also apply a feature to a subset of characters in the
83 font. For example, "\fB\-\-lf\fR smcp"
84 .I only
85 replaces letters with small capitals, whereas "\fB\-f\fRsmcp" might
86 additionally replace digits and punctuation marks with small-capital
87 versions.
88 '
89 .SS Automatic Mode
90 .PP
91 Automatic mode, triggered by the
92 .BR \-a / \-\-automatic
93 option, installs font metrics and encoding files where TeX can find them,
94 and additionally installs a Type 1 font and mapping for
95 .M dvips 1 .
96 This requires a TeX installation that follows the TeX Directory Structure
97 standard (http://www.tug.org/tds/), such as most Unix TeX installations.
98 '
99 .PP
100 Automatic mode should run seamlessly out of the box.
101 .B Otftotfm
102 will install metrics files, encodings, map files, and Type\~1 fonts into
103 .I $HOME/.texmf-var
104 or any other writable TEXMF directory, and run
105 .M updmap 1
106 to update the global lists of installed fonts. (On older teTeX
107 installations, you may first need to copy the system's
108 .I updmap.cfg
109 file to
110 .I $HOME/texmf/web2c
111 and run
112 .M mktexlsr 1 .
113 On newer TeXLive installations, you may need to set the TEXMFVAR environment
114 variable.)
115 You can then run "\fBotftotfm\fR
116 .B \-a
117 .IR fontfile
118 .IR texname \&"
119 and immediately refer to the font in TeX using the
120 .I texname
121 you supplied. Again, you will have to write ".fd" files and/or typescripts
122 to make the font conveniently accessible from LaTeX or ConTeXt. See the
123 DIAGNOSTICS section if you have problems with these instructions.
124 '
125 .PP
126 In automatic mode,
127 .B otftotfm
128 searches your $TEXMFVAR or $TEXMF path for a writable directory, then
129 installs files under that directory tree as follows:
130 '
131 .TS
132 l l l .
133 \fBFile type\fR \fBDirectory\fR \fBFilename\fR
134 TFM TEXMF/fonts/tfm/\fIvendor\fR/\fItypeface\fR/ \fItexname\fR[\-\-base].tfm
135 VF TEXMF/fonts/vf/\fIvendor\fR/\fItypeface\fR/ \fItexname\fR.vf
136 PL TEXMF/fonts/pl/\fIvendor\fR/\fItypeface\fR/ \fItexname\fR[\-\-base].pl
137 VPL TEXMF/fonts/vpl/\fIvendor\fR/\fItypeface\fR/ \fItexname\fR.vpl
138 encoding TEXMF/fonts/enc/dvips/\fIvendor\fR/ a_\fIsignature\fR.enc
139 or TEXMF/dvips/\fIvendor\fR/
140 font map TEXMF/fonts/map/dvips/\fIvendor\fR/ \fIvendor\fR.map
141 or TEXMF/dvips/\fIvendor\fR/
142 .TE
143 .PP
144 "TEXMF" stands for the writable TEXMF directory. \fITexname\fR is the
145 font name supplied as
146 .BR otftotfm 's
147 second argument. The \fIvendor\fR and \fItypeface\fR strings are required
148 by TDS; they default to "lcdftools" and the font's family name,
149 respectively, but see the
150 .B \-\-vendor
151 and
152 .B \-\-typeface
153 options. \fISignature\fR is an opaque 6-character encoding signature.
154 .PP
155 .B Otftotfm
156 also installs a font file suitable for printing. PostScript-flavored
157 OpenType fonts are translated to Type 1 format and installed as PFB fonts.
158 TrueType-flavored fonts are normally installed as is, since pdftex and
159 pdflatex can read TrueType directly; but if you provide the
160 .B \-\-type42
161 option,
162 .B otftotfm
163 will translate TrueType fonts to Type 42 format, which dvips understands.
164 .B Otftotfm
165 does not overwrite existing font files.
166 .PP
167 The installation paths are as follows, where \fIPSname\fR is the font's
168 PostScript name.
169 .TS
170 l l l .
171 PFB TEXMF/fonts/type1/\fIvendor\fR/\fItypeface\fR/ \fIPSname\fR.pfb
172 TrueType TEXMF/fonts/truetype/\fIvendor\fR/\fItypeface\fR/ \fIfontfile\fR
173 Type 42 TEXMF/fonts/type42/\fIvendor\fR/\fItypeface\fR/ \fIPSname\fR.t42
174 .TE
175 .PP
176 You can override these directories with environment variables and options
177 as follows. Options take precedence over environment variables.
178 '
179 .TS
180 l l l .
181 \fBFile type\fR \fBEnvironment variable\fR \fBOption\fR
182 TFM TFMDESTDIR \-\-tfm\-directory
183 VF VFDESTDIR \-\-vf\-directory
184 PL PLDESTDIR \-\-pl\-directory
185 VPL VPLDESTDIR \-\-vpl\-directory
186 encoding ENCODINGDESTDIR \-\-encoding\-directory
187 PFB T1DESTDIR \-\-type1\-directory
188 TrueType TRUETYPEDESTDIR \-\-truetype\-directory
189 Type 42 T42DESTDIR \-\-type42\-directory
190 font map \- \-\-map\-file
191 .TE
192 .PP
193 .B Otftotfm
194 will update the
195 .I TEXMF/ls-R
196 file when installing files under TEXMF. It will also run the
197 .M updmap 1
198 program after changing a map file, unless the
199 .B \-\-no\-updmap
200 option was supplied. However, if an executable file called
201 .IR TEXMF/dvips/updmap
202 exists, this file is executed (from the
203 .I TEXMF/dvips
204 directory) rather than the global
205 .BR updmap .
206 This is so you can write a fast, customized version of
207 .B updmap
208 if desired.
209 '
210 .SH EXAMPLE
211 This section uses MinionPro to show one way to install OpenType fonts for
212 LaTeX. We begin with six fonts: "MinionPro-Regular.otf",
213 "MinionPro-It.otf", "MinionPro-Semibold.otf", "MinionPro-SemiboldIt.otf",
214 "MinionPro-Bold.otf", and "MinionPro-BoldIt.otf".
215 .PP
216 Our first task is to decide how to encode the fonts. The "encoding scheme"
217 is used by TeX to decide how to typeset accents and symbols like "$". The
218 "LY1" encoding scheme has reasonable accent support and is a good choice
219 for many OpenType fonts. LY1 corresponds to the "texnansx.enc" encoding
220 file, so we will supply
221 .B otftotfm
222 with the "\fB\-e\fR texnansx" option.
223 .RS
224 .LP
225 Expert note: Strictly speaking, LY1 corresponds to the "texnansi.enc"
226 encoding file. Since the "texnansx.enc" version omits duplicate
227 characters, it has more room for font-specific glyphs and is generally a
228 better choice; but if you plan to type characters like "ae" directly into
229 your editor, rather than using TeX commands like \eae, you should use
230 "texnansi.enc".
231 .RE
232 .PP
233 Next, we decide on a naming scheme for the font metric files. Let's use
234 the OpenType font names as a base. (There's generally no need to follow
235 the six-character "Karl Berry" naming scheme.) Just in case we come back
236 later and add a different encoding scheme, we'll prepend "LY1--" to each
237 name.
238 .PP
239 We're now ready to run
240 .B otftotfm
241 for the first set of fonts. Note the "\fB\-f\fRkern \fB\-f\fRliga"
242 options, which access pair kerns and the default "f" ligatures.
243 .Sp
244 .nf
245 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-Regular.otf \e
246 \fB\-f\fRkern \fB\-f\fRliga LY1\-\-MinionPro\-Regular
247 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-It.otf \e
248 \fB\-f\fRkern \fB\-f\fRliga LY1\-\-MinionPro\-It
249 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-Semibold.otf \e
250 \fB\-f\fRkern \fB\-f\fRliga LY1\-\-MinionPro\-Semibold
251 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-SemiboldIt.otf \e
252 \fB\-f\fRkern \fB\-f\fRliga LY1\-\-MinionPro\-SemiboldIt
253 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-Bold.otf \e
254 \fB\-f\fRkern \fB\-f\fRliga LY1\-\-MinionPro\-Bold
255 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-BoldIt.otf \e
256 \fB\-f\fRkern \fB\-f\fRliga LY1\-\-MinionPro\-BoldIt
257 .fi
258 .Sp
259 The small-caps fonts are generated with an additional "\fB\-f\fRsmcp"
260 option. We append "\-\-fsmcp" to the font metric names as well,
261 differentiating them from the regular fonts. Although MinionPro's italic
262 fonts support small-caps, the LaTeX font selection scheme can't access them
263 easily, so we've left them off.
264 .Sp
265 .nf
266 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-Regular.otf \e
267 \fB\-f\fRkern \fB\-f\fRliga \fB\-f\fRsmcp LY1\-\-MinionPro-Regular\-\-fsmcp
268 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-Semibold.otf \e
269 \fB\-f\fRkern \fB\-f\fRliga \fB\-f\fRsmcp LY1\-\-MinionPro\-Semibold\-\-fsmcp
270 \fBotftotfm\fR \fB\-a\fR \fB\-e\fR texnansx MinionPro\-Bold.otf \e
271 \fB\-f\fRkern \fB\-f\fRliga \fB\-f\fRsmcp LY1\-\-MinionPro\-Bold\-\-fsmcp
272 .fi
273 .Sp
274 To get old-style numerals, just add the "\fB\-f\fRonum" option to each
275 invocation -- and, to reduce confusion, append "\-\-fonum" to the font metric
276 names.
277 .PP
278 At this point, all our font metric files are installed, and it's finally
279 time to create the ".fd" file. (The ".fd" format is documented in
280 .IR "The LaTeX Companion" .)
281 Let's call the LaTeX font family "MinionPro". Then the ".fd" file is
282 "LY1MinionPro.fd", and it contains:
283 .Sp
284 .nf
285 \eDeclareFontFamily{LY1}{MinionPro}{}
286 \eDeclareFontShape{LY1}{MinionPro}{m}{n}%
287 { <\-> LY1\-\-MinionPro\-Regular }{}
288 \eDeclareFontShape{LY1}{MinionPro}{m}{it}{ <\-> LY1\-\-MinionPro\-It }{}
289 \eDeclareFontShape{LY1}{MinionPro}{m}{sc}%
290 { <\-> LY1\-\-MinionPro\-Regular\-\-fsmcp }{}
291 \eDeclareFontShape{LY1}{MinionPro}{sb}{n}%
292 { <\-> LY1\-\-MinionPro\-Semibold }{}
293 \eDeclareFontShape{LY1}{MinionPro}{sb}{it}%
294 { <\-> LY1\-\-MinionPro\-SemiboldIt }{}
295 \eDeclareFontShape{LY1}{MinionPro}{sb}{sc}%
296 { <\-> LY1\-\-MinionPro\-Semibold\-\-fsmcp }{}
297 \eDeclareFontShape{LY1}{MinionPro}{b}{n}{ <\-> LY1\-\-MinionPro-Bold }{}
298 \eDeclareFontShape{LY1}{MinionPro}{b}{it}%
299 { <\-> LY1\-\-MinionPro\-BoldIt }{}
300 \eDeclareFontShape{LY1}{MinionPro}{b}{sc}%
301 { <\-> LY1\-\-MinionPro\-Bold\-\-fsmcp }{}
302 \eDeclareFontShape{LY1}{MinionPro}{bx}{n}%
303 { <\-> ssub * MinionPro/b/n }{}
304 \eDeclareFontShape{LY1}{MinionPro}{bx}{it}%
305 { <\-> ssub * MinionPro/b/it }{}
306 \eDeclareFontShape{LY1}{MinionPro}{bx}{sc}%
307 { <\-> ssub * MinionPro/b/sc }{}
308 .fi
309 .PP
310 We're now ready to use MinionPro in LaTeX, with lines like this in the
311 document preamble:
312 .Sp
313 .nf
314 \eusepackage[LY1]{fontenc}
315 \erenewcommand{\ermdefault}{MinionPro}
316 \erenewcommand{\ebfdefault}{b}
317 .fi
318 .PP
319 Of course, we're free at any time to add more MinionPro variants with
320 .BR otftotfm ;
321 they'll become accessible to LaTeX as soon as we edit the "MinionPro.fd"
322 file.
323 '
324 .SH OPTIONS
325 With long options, you need type only as many characters as will make the
326 option unique.
327 .SS Font Feature and Transformation Options
328 .PD 0
329 .TP 5
330 .BI \-s " script\fR[.\fIlang\fR], " \-\-script= "script\fR[.\fIlang\fR]"
331 Apply features suitable to the script system
332 .I script
333 and language system
334 .IR lang .
335 Scripts and language systems are two-to-four-letter names assigned by
336 Microsoft and Adobe. Examples include "latn" (Latin script), "grek" (Greek
337 script), and "yi.YIC" (Yi script with classic characters). If
338 .I lang
339 is not specified,
340 .B otftotfm
341 will use the default language system for that
342 script. You can give this option multiple times. Run "\fBotfinfo\fR
343 \-s \fIfont\fR" to see the list of scripts and languages a
344 font supports. Defaults to "latn".
345 '
346 .Sp
347 .TP 5
348 .BI \-f " feature\fR, " \-\-feature= "feature"
349 Activate the feature named
350 .IR feature .
351 Features are four-letter names assigned by Microsoft and Adobe; they are
352 meant to correspond to font behaviors, such as kerning or small-capitals.
353 Examples include "liga" (default ligatures), "dlig" (discretionary
354 ligatures), "kern" (kerning), and "c2sc" (replacing capitals with small
355 capitals). Give this option multiple times to apply multiple features. Run
356 "\fBotfinfo\fR \-f [\-\-script option] \fIfont\fR" to see the list
357 of features a font supports for a specified script.
358 Defaults to any features required by the selected scripts.
359 '
360 .Sp
361 .TP 5
362 .BI \-\-lf " feature\fR, " \-\-letter\-feature= "feature"
363 Activate the feature named
364 .IR feature ,
365 but only for letters. For instance, the "\-f smcp" option will apply the
366 small-caps feature to all characters in the encoding; this may result in
367 changes to punctuation and numbers as well as letters. The "\-\-lf smcp"
368 option will apply the small-caps feature only to letters, meaning
369 characters with the "Letter" Unicode property.
370 '
371 .Sp
372 .TP 5
373 .BI \-\-subs\-filter " pattern"
374 .TP 5
375 .BI \-\-include\-subs " pattern"
376 .TP 5
377 .BI \-\-exclude\-subs " pattern"
378 .TP 5
379 .BI \-\-clear\-subs
380 Limit the characters that
381 .B otftotfm
382 will substitute. Substitution is allowed on an input character if it
383 matches at least one of the
384 .B \-\-include
385 patterns, and none of the
386 .B \-\-exclude
387 patterns. Each pattern applies to all following features, except that the
388 .B \-\-clear
389 option clears any accumulated patterns. The
390 .BI \-\-subs\-filter " pattern"
391 option acts like
392 .B \-\-clear\-subs
393 followed by
394 .BI \-\-include\-subs " pattern\fR. "
395 For pattern syntax, see GLYPH PATTERNS, below.
396 .Sp
397 In the command line below, the \&'<Number>' pattern will force the "onum"
398 feature to substitute only numbers (and not, for example, punctuation).
399 The "salt" feature can still substitute any character.
400 .nf
401 \fBotftotfm\fR \fB\-f\fRsalt \fB\-\-include\-subs\fR="<Number>" \fB\-f\fRonum \.\.\.
402 .fi
403 '
404 .Sp
405 .TP 5
406 .BI \-E " fac\fR, " \-\-extend= fac
407 Widen, or extend, the font by a factor of
408 .IR fac .
409 Like
410 .M afm2tfm 1 's
411 .B \-e
412 option.
413 '
414 .Sp
415 .TP 5
416 .BI \-S " amt\fR, " \-\-slant= amt
417 Oblique, or slant, the font by
418 .IR amt .
419 Like
420 .M afm2tfm 1 's
421 .B \-s
422 option.
423 '
424 .Sp
425 .TP 5
426 .BI \-L " amt\fR, " \-\-letterspacing= amt
427 Letterspace each character by
428 .IR amt
429 units, where 1000 units equals one em. The width of each character
430 increases by
431 .IR amt ,
432 with half the space distributed to each sidebearing. Boundary-character
433 kerns are added to maintain alignment at the ends of lines.
434 '
435 .Sp
436 .TP 5
437 .BR \-\-math\-spacing "[=\fIskewchar\fR]"
438 Ignore the font's claimed character widths, deriving horizontal metrics
439 from bounding boxes instead. This results in similar spacing as the
440 Computer Modern Math Italic font, with increased sidebearings for letters
441 like f and j.
442 .Sp
443 If you provide
444 .IR skewchar ,
445 a number between 0 and 255 or a single character, then
446 .B otftotfm
447 adds heuristically-derived kerns to the font that may improve accent
448 positions in math mode. To get the benefits, you must tell TeX about the
449 .I skewchar
450 with a command like "\eskewchar\efont=\fIskewchar\fR".
451 '
452 .Sp
453 .TP 5
454 .BI "\-k " "N\fR, " \-\-min\-kern= N
455 Only output kerning pairs whose absolute value is
456 .IR N
457 or larger. Larger minimum kerns make kerning less precise, but shrink the
458 output TFM file. The default minimum kern is 2.0, or 0.002 em.
459 '
460 .Sp
461 .TP 5
462 .BI \-\-space\-factor= fac
463 Scale the width of the inter-word space by a factor of
464 .IR fac .
465 '
466 .Sp
467 .TP 5
468 .BI \-\-design\-size= size
469 Set the output font's design size to
470 .IR size ,
471 a value in TeX points. This value is mostly just documentation, since LaTeX
472 essentially ignores fonts' design sizes, but plain TeX may occasionally use
473 the design size to decide how large a font should be. (Loading a font in
474 TeX "at" a particular size effectively ignores the design size; loading a
475 font plain or "scaled" by a given factor uses the design size.) The default
476 is taken from the input font's optical size feature, or 10pt if it has no
477 such feature.
478 '
479 .Sp
480 .TP 5
481 .BI \-\-fixed\-width
482 Set the font to fixed-width (its space character will have no stretch or
483 shrink). Normally you won't need this option; the font will tell
484 .B otftotfm
485 whether it is fixed width. The opposite of
486 .B \-\-fixed\-width
487 is
488 .BR \-\-proportional\-width .
489 '
490 .Sp
491 .TP 5
492 .BI \-\-italic\-angle= angle
493 Set the output font's default italic angle to
494 .IR angle ,
495 a number of degrees. This value is used by TeX to position
496 accents. Normally you won't need this option; the font will tell
497 .B otftotfm
498 its italic angle.
499 .PD
500 '
501 .Sp
502 .TP 5
503 .BI \-\-x\-height= val
504 Set the output font's x-height to
505 .IR val .
506 This value is used by TeX to position accents. Normally you won't
507 need this option.
508 .IR Val
509 may be a number expressed in font units; \(oqx\(cq, which uses the
510 height of the font's lowercase x; or \(oqfont\(cq, which uses the
511 font's declared x-height metric.
512 '
513 .SS Encoding Options
514 '
515 .PD 0
516 .TP 5
517 .BI \-e " encoding\fR, " \-\-encoding= encoding
518 Select the output metrics's base
519 .M dvips 1
520 encoding.
521 .B Otftotfm
522 will search for
523 .IR encoding [.enc]
524 the same way that
525 .B dvips
526 would, so you may not need to give a full pathname. Say
527 .B \-e \-
528 to start with the font's default encoding.
529 See ENCODINGS, below,
530 for more information.
531 '
532 .Sp
533 .TP 5
534 .BI \-\-boundary\-char= char
535 Set the font's boundary character to
536 .IR char ,
537 which should either be a single non-digit character, or a number between \-1
538 and 255. The default is taken from the encoding.
539 '
540 .Sp
541 .TP 5
542 .BI \-\-altselector\-char= char
543 Set the font's alternate selector character to
544 .IR char ,
545 which should either be a single non-digit character, or a number between
546 \&\-1 and 255. Alternate selectors let TeX authors explicitly choose
547 between versions of a character. For instance, the
548 \&'\-\-altselector\-char="*"' option turns the "*" character into a special
549 switch that cycles between alternates. For instance, the TeX input "A"
550 would produce the normal version of the "A" Unicode character, "A*" would
551 produce the first alternate, "A**" would produce the second alternate, and
552 so forth. Furthermore, "s*t" will activate any discretionary "s_t"
553 ligature in the font.
554 .Sp
555 The
556 .B \-\-altselector\-char
557 mechanism uses the features specified by
558 .BR \-\-altselector\-feature
559 options.
560 .Sp
561 The alternate-selector character may also be specified in the encoding; see
562 ENCODINGS, below. See Sivan Toledo's article cited in the SEE ALSO section
563 for more information.
564 '
565 .Sp
566 .TP 5
567 .BI \-\-altselector\-feature= feature
568 Activate the feature named
569 .I feature
570 for the
571 .B \-\-altselector\-char
572 mechanism. Give this option multiple times to activate multiple
573 features. This option activates features only for use with
574 .BR \-\-altselector\-char ;
575 use the
576 .B \-\-feature
577 option to activate features globally. Defaults to the
578 .I salt
579 and
580 .I dlig
581 features.
582 '
583 .Sp
584 .TP 5
585 .BI \-\-alternates\-filter= pattern
586 .TP 5
587 .BI \-\-include\-alternates= pattern
588 .TP 5
589 .BI \-\-exclude\-alternates= pattern
590 .TP 5
591 .BI \-\-clear\-alternates
592 Limit the alternate characters that
593 .B otftotfm
594 will select. An alternate is used if it matches at least one of the
595 .B \-\-include
596 patterns, and none of the
597 .B \-\-exclude
598 patterns. Each pattern applies to all following features, except that the
599 .B \-\-clear
600 option clears any accumulated patterns. The
601 .BI \-\-alternates\-filter " pattern"
602 option acts like
603 .B \-\-clear\-alternates
604 followed by
605 .BI \-\-include\-alternates " pattern\fR. "
606 For pattern syntax, see GLYPH PATTERNS, below.
607 .Sp
608 OpenType fonts can have many alternates per character, most of which aren't
609 interesting. For example, the character "a" in WarnockPro-Regular has five
610 alternates, "ordfeminine", "Asmall", "asuperior", "a.end", and
611 "orn.013". The
612 .B \-\-altselector\-char
613 option lets you cycle through these alternates, but it's better to leave
614 out the ones you don't want, to avoid overfull encodings. Thus, if you were
615 only interested in ".end" variants, you might supply an
616 \&'\-\-include\-alternates="*.end"'
617 option.
618 .Sp
619 In the command line below, the \&'*.end' pattern will apply to "aalt"
620 alternates, but not to "salt" alternates.
621 .nf
622 \fBotftotfm\fR \fB\-f\fRsalt \fB\-\-include\-alternates\fR="*.end" \fB\-f\fRaalt \.\.\.
623 .fi
624 '
625 .Sp
626 .TP 5
627 .BI \-\-ligkern= command
628 Add a LIGKERN
629 .IR command
630 to the encoding. For example, \&'\fB\-\-ligkern\fR "T {L} h"' suppresses any
631 T_h ligature in the font. You can supply multiple
632 .B \-\-ligkern
633 options. See ENCODINGS, below.
634 '
635 .Sp
636 .TP 5
637 .BI \-\-position= command
638 Add a POSITION
639 .IR command
640 to the encoding. For example, \&'\fB\-\-position\fR "T 10 0 20"' adds ten
641 units of space to either side of the "T" character. You can supply
642 multiple
643 .B \-\-position
644 options. See ENCODINGS, below.
645 '
646 .Sp
647 .TP 5
648 .BI \-\-unicoding= command
649 Add a UNICODING
650 .IR command
651 to the encoding. For example, \&'\fB\-\-unicoding\fR "pi1 =: uni03D6"' tells
652 .B otftotfm
653 to encode "/pi1" as U+03D6 GREEK PI SYMBOL. You can supply multiple
654 .B \-\-unicoding
655 options. See ENCODINGS, below.
656 '
657 .Sp
658 .TP 5
659 .BI \-\-no\-encoding\-commands
660 Ignore any LIGKERN and/or UNICODING commands in the encoding file.
661 '
662 .Sp
663 .TP 5
664 .BI \-\-no\-default\-ligkern
665 Don't include
666 .BR otftotfm 's
667 default LIGKERN commands.
668 '
669 .Sp
670 .TP 5
671 .BI \-\-coding\-scheme= scheme
672 Add a CODINGSCHEME to the encoding. See ENCODINGS, below.
673 '
674 .Sp
675 .TP 5
676 .BI \-\-warn\-missing
677 Warn about encoded characters not supported by the font. See the
678 WARNMISSING command in ENCODINGS, below.
679 '
680 .Sp
681 .TP 5
682 .BI \-\-literal\-encoding= encoding
683 Select the
684 .M dvips 1
685 encoding used for the font. No glyph substitutions will be permitted, so
686 the output encoding will equal the input encoding (and
687 .B otftotfm
688 will not generate an output encoding).
689 '
690 .Sp
691 .TP 5
692 .BI \-\-base\-encodings= file
693 .B Experts only.
694 Allow the output font to refer to existing "base" fonts. This can greatly
695 reduce the number of base fonts generated by
696 .BR otftotfm ". "
697 Each line in the
698 .I file
699 argument contains a TeX font name (as for
700 .BR \-\-name )
701 and a corresponding literal encoding file (as for
702 .BR \-\-literal\-encoding );
703 for example:
704 .nf
705 WarnoProReg\-\-eka eka
706 WarnoProReg\-\-exp1 exp1
707 .fi
708 The named fonts must have been created by prior runs of
709 .B otftotfm
710 on the same input OpenType font, with the same
711 .BR \-\-extend
712 and
713 .BR \-\-slant
714 options as the current run. The current output font will refer to glyphs
715 from the named base fonts when possible. If the base fonts cover all
716 glyphs required by the output font,
717 .B otftotfm
718 won't generate any new base fonts at all. The
719 .I file
720 can also refer to dotless-J fonts using the following syntax:
721 .nf
722 WarnoProReg\-\-lcdfj \- dotlessj
723 .fi
724 '
725 .PD
726 '
727 '
728 .SS Automatic Mode Options
729 '
730 .PD 0
731 .TP 5
732 .BI \-a "\fR, " \-\-automatic
733 Select automatic mode.
734 '
735 .Sp
736 .TP 5
737 .BI \-v " vendor\fR, " \-\-vendor= vendor
738 Set the font vendor name, which is used to locate files within the TDS.
739 Defaults to "lcdftools".
740 .Sp
741 In automatic mode, TeX and friends will generally find required font files
742 independently of the vendor you select.
743 '
744 .Sp
745 .TP 5
746 .BI \-\-typeface= typeface
747 Set the font typeface name, which is used to locate files within the TDS.
748 Defaults to the current font's family name with unsuiable characters
749 removed.
750 '
751 .Sp
752 .TP 5
753 .BI \-\-no\-type1
754 Do not use
755 .M cfftot1 1
756 to create Type 1 fonts corresponding to the OpenType input fonts.
757 '
758 .Sp
759 .TP 5
760 .BI \-\-no\-dotlessj
761 Do not use
762 .M t1dotlessj 1
763 to create a special dotless-j font when the input font doesn't have
764 dotless-j.
765 '
766 .Sp
767 .TP 5
768 .BI \-\-no\-truetype
769 Do not install TrueType-flavored fonts.
770 '
771 .Sp
772 .TP 5
773 .BI \-\-type42
774 Install TrueType-flavored fonts in translated Type 42 format.
775 '
776 .Sp
777 .TP 5
778 .BI \-\-no\-updmap
779 Do not run an
780 .M updmap 1
781 program. This can be useful if you're installing a bunch of fonts; it is
782 much faster to run
783 .B updmap
784 once, at the end, than to run it once per font.
785 .PD
786 '
787 '
788 .SS Output Options
789 .PD 0
790 .TP 5
791 .BI \-n " texname\fR, " \-\-name= texname
792 Set the TeX name of the output font, which is used in font map files and,
793 in automatic mode, to generate the output filename. The default is derived
794 from the OpenType font's name and the features you selected.
795 '
796 .Sp
797 .TP 5
798 .BI \-p "\fR, " \-\-pl
799 Output human-readable PL and VPL metrics, not binary TFM and VF metrics.
800 Note:
801 .BR Otftotfm 's
802 PL and VPL output files are legal, but the
803 .B fontinst
804 program may not accept them (it has a picky parser). Make sure to supply a
805 .BR \-\-coding\-scheme ;
806 if that doesn't help, run the TFM output through
807 .M tftopl 1 .
808 '
809 .Sp
810 .TP 5
811 .BI \-\-no\-virtual
812 Do not generate virtual fonts (VFs and VPLs).
813 .B Otftotfm
814 will warn if the selected font features cannot be implemented without
815 virtual fonts.
816 '
817 .Sp
818 .TP 5
819 .BI \-\-no\-encoding
820 Do not generate an encoding file.
821 '
822 .Sp
823 .TP 5
824 .BR \-\-output\-encoding [=\fIfile\fR]
825 Only generate an encoding file; do not generate any other output. The
826 encoding file is written to
827 .IR file ,
828 or to standard output if no
829 .I file
830 argument is supplied.
831 '
832 .Sp
833 .TP 5
834 .BI \-\-no\-map
835 Do not generate a font map line for the font.
836 '
837 .\" .Sp
838 .\" .TP 5
839 .\" .BI \-\-base\-name name
840 .\" Experts only: Set the TeX name of the "base" output font. When
841 .\" .B otftotfm
842 .\" needs to make a virtual font (because of font features and/or
843 .\" letterspacing), it must generate at least two TFM metrics files, one for
844 .\" the base font and one for the virtual font. In some cases, multiple
845 .\" virtual fonts can share the same base metrics, reducing the number of
846 .\" installed metrics files. This option lets you explicitly set the name of
847 .\" the base output font independently from the main output font, and thus
848 .\" force fonts to share base metrics. The default base name is derived from
849 .\" the TeX name, with "\f(CW\-\-base\fR" appended.
850 .PD
851 '
852 '
853 .SS File Location Options
854 .PD 0
855 .TP 5
856 .BI \-\-tfm\-directory= dir
857 .TP 5
858 .BI \-\-pl\-directory= dir
859 .TP 5
860 .BI \-\-vf\-directory= dir
861 .TP 5
862 .BI \-\-vpl\-directory= dir
863 .TP 5
864 .BI \-\-encoding\-directory= dir
865 .TP 5
866 .BI \-\-type1\-directory= dir
867 .TP 5
868 .BI \-\-truetype\-directory= dir
869 .TP 5
870 .BI \-\-type42\-directory= dir
871 .TP 5
872 .BI \-\-directory= dir
873 Set the directory used for various output types. Each directory may be set
874 by an environment variable, and defaults to a TDS directory in automatic
875 mode, or to "." otherwise. Environment variable names and default TDS
876 locations are described in the Automatic Mode section above. The
877 .B \-\-directory
878 option sets the default directory for all output types.
879 '
880 .Sp
881 .TP 5
882 .BI \-\-map\-file= filename
883 Set file in which
884 .B otftotfm
885 will write a font map
886 line for the font. The default is the standard output in manual mode, and
887 "TEXMF/fonts/map/dvips/\fIvendor\fR/\fIvendor\fR.map" (or
888 "TEXMF/dvips/\fIvendor\fR/\fIvendor\fR.map" on older installations) in
889 automatic mode.
890 .PD
891 '
892 '
893 .SS Miscellaneous Options
894 .PD 0
895 .TP 5
896 .BI \-\-glyphlist= file
897 Use
898 .I file
899 as a Adobe glyph list, which helps translate glyph names to Unicode code
900 points. Give multiple options to include multiple files.
901 See ENCODINGS, below, for more information.
902 '
903 .Sp
904 .TP 5
905 .BR \-V ", " \-\-verbose
906 Write progress messages to standard error.
907 '
908 .Sp
909 .TP 5
910 .BR \-\-no\-create
911 Do not create or modify any files. Instead, write messages about the
912 program's hypothetical progress to standard error.
913 '
914 .Sp
915 .TP 5
916 .BR \-\-force
917 Generate all files, even if it looks like versions are already installed.
918 '
919 .Sp
920 .TP 5
921 .BR \-q ", " \-\-quiet
922 Do not generate any error messages.
923 '
924 .Sp
925 .TP 5
926 .BI \-\-kpathsea\-debug= flags
927 Set path searching debugging flags. See the
928 .I Kpathsea
929 manual for details.
930 '
931 .Sp
932 .TP 5
933 .BR \-h ", " \-\-help
934 Print usage information and exit.
935 '
936 .Sp
937 .TP 5
938 .BR \-\-version
939 Print the version number and some short non-warranty information and exit.
940 .PD
941 '
942 .SH ENCODINGS
943 .B Otftotfm
944 interprets encoding files as Unicode. For example, say an input encoding
945 has "/dotlessi" at position 10.
946 .B Otftotfm
947 detects that position 10 should contain Unicode character U+0131 LATIN
948 SMALL LETTER DOTLESS I, and uses the font's glyph for that character
949 (possibly modified by any active features). The selected glyph might not
950 be named "dotlessi"; only the Unicode value matters.
951 .PP
952 .B Otftotfm
953 assigns Unicode values to glyph names using a table published by Adobe (SEE
954 ALSO has a reference), with extensions for TeX. For more fine-grained
955 control, add UNICODING commands to the input encoding file. These commands
956 have the following format:
957 .nf
958 % UNICODING \fIglyph\fR =: \fIchoice1\fR [\fIchoice2\fR ...] ;
959 .fi
960 This tells
961 .B otftotfm
962 that the glyph named
963 .I glyph
964 translates into the first Unicode value in the
965 .I choice
966 list that has a character in the font. \fIGlyph\fR and the
967 .IR choice s
968 are PostScript glyph names; the initial "%" sign is required; and each
969 UNICODING line can contain multiple commands, separated by spaced
970 semicolons. For example,
971 .nf
972 % UNICODING pi1 =: uni03D6 ;
973 .fi
974 encodes the character "/pi1" as U+03D6 GREEK PI SYMBOL,
975 and
976 .nf
977 % UNICODING Delta =: uni0394 uni2206 ;
978 .fi
979 makes U+0394 GREEK CAPITAL LETTER DELTA preferred to
980 U+2206 INCREMENT as an encoding for "/Delta". You can also supply
981 glyph names:
982 .nf
983 % UNICODING Delta =: Deltagreek Delta ;
984 .fi
985 A mapping with no Unicode values removes that glyph from the input
986 encoding. For instance, this erases any f-ligature characters from the
987 encoding:
988 .nf
989 % UNICODING ff =: ; fi =: ; fl =: ; ffi =: ; ffl =: ;
990 .fi
991 The slots are available for
992 .BR otftfm 's
993 own use, for example for other characters required by the font. (If the
994 f-ligatures themselves are required by the font, for instance by a \&'liga'
995 feature, then they will be stored into their old slots when possible.) Map
996 a glyph to \&'emptyslot' if you don't want
997 .B otftotfm
998 to use the slot. For example, this will leave the \&'ff' slot unused if
999 the font has no \&'ff' glyph:
1000 .nf
1001 % UNICODING ff =: ff emptyslot ;
1002 .fi
1003 (Note that most OpenType fonts provide a visible representation for unused
1004 encoding slots, namely a box with an X inside.)
1005 .PP
1006 LIGKERN comments in the encoding can add ligatures and inhibit kerns, as in
1007 .M afm2tfm 1 .
1008 To add a ligature, say:
1009 .nf
1010 % LIGKERN \fIglyph1\fR \fIglyph2\fR =: \fIresult\fR ;
1011 .fi
1012 The "=:" operator indicates a normal ligature, where both the input glyphs
1013 are removed and replaced by
1014 .IR result .
1015 To preserve the left-hand glyph, for an effect like "\fIglyph1\fR
1016 \fIglyph2\fR =: \fIglyph1\fR \fIresult\fR", use "|=:" instead; to preserve
1017 the right-hand glyph, use "=:|".
1018 .\" The other five ligature operators are not yet supported.
1019 To remove all kerns between two characters, say:
1020 .nf
1021 % LIGKERN \fIglyph1\fR {} \fIglyph2\fR ;
1022 .fi
1023 A "*" matches any character, so
1024 .nf
1025 % LIGKERN a {} * ;
1026 .fi
1027 removes all kerns with "a" as the left-hand character, and
1028 .nf
1029 % LIGKERN * {} * ;
1030 .fi
1031 removes all kerns.
1032 .PP
1033 .B Otftotfm
1034 also supports extended syntax for setting kern values and inhibiting
1035 ligatures. To add an \fIn\fR-unit kern between two glyphs, say:
1036 .nf
1037 % LIGKERNX \fIglyph1\fR {\fIn\fR} \fIglyph2\fR ;
1038 .fi
1039 where \fIn\fR is an integer. This:
1040 .nf
1041 % LIGKERNX \fIglyph1\fR {L} \fIglyph2\fR ;
1042 .fi
1043 inhibits any ligature between
1044 .I glyph1
1045 and
1046 .IR glyph2 .
1047 "{LK}" and "{KL}" inhibit both ligatures and kerns.
1048 .PP
1049 You can set the
1050 .B \-\-boundary\-char
1051 and
1052 .B \-\-altselector\-char
1053 from an encoding file with commands like this:
1054 .nf
1055 % LIGKERN || = \fIboundarychar\fR ;
1056 % LIGKERNX ^^ = \fIaltselectorchar\fR ;
1057 .fi
1058 As with UNICODING, each LIGKERN or LIGKERNX line can contain multiple
1059 commands, separated by spaced semicolons.
1060 .PP
1061 .B Otftotfm
1062 has a default set of eight ligatures, namely:
1063 .nf
1064 space l =: lslash ; space L =: Lslash ;
1065 question quoteleft =: questiondown ; exclam quoteleft =: exclamdown ;
1066 hyphen hyphen =: endash ; endash hyphen =: emdash ;
1067 quoteleft quoteleft =: quotedblleft ;
1068 quoteright quoteright =: quotedblright
1069 .fi
1070 LIGKERN commands in the encoding file and
1071 .B \-\-ligkern
1072 options can override these defaults, or supply the
1073 .B \-\-no\-default\-ligkern
1074 option to turn them off.
1075 .PP
1076 The POSITION command shifts a glyph within its bounding box. The syntax is
1077 .nf
1078 % POSITION \fIglyph\fR \fIpdx\fR \fIpdy\fR \fIadx\fR ;
1079 .fi
1080 This will add
1081 .I pdx
1082 units of space to
1083 .IR glyph 's
1084 left edge; raise it up by
1085 .I pdy
1086 units; and add
1087 .I adx
1088 units to its width. For example, to add 10 units of space to either side
1089 of the "T" glyph, supply
1090 .nf
1091 % POSITION T 10 0 20
1092 .fi
1093 To move the "degree" symbol up by 20 units, supply
1094 .nf
1095 % POSITION degree 0 20 0
1096 .fi
1097 .PP
1098 The CODINGSCHEME command specifies the coding scheme for fonts using this
1099 encoding. This is a string, less than 40 characters long and containing no
1100 parentheses, that classifies the encoding for TeX's purposes. Sample
1101 coding schemes include "TEX TEXT", "TEX MATH ITALIC", and "EXTENDED TEX
1102 FONT ENCODING - LATIN". For example:
1103 .nf
1104 % CODINGSCHEME EXTENDED TEX FONT ENCODING - LATIN
1105 .fi
1106 Most tools ignore the coding scheme; fontinst is an exception.
1107 .B Otftotfm
1108 uses the encoding's PostScript name for the default coding scheme.
1109 .PP
1110 Finally, the WARNMISSING command makes any glyphs not supported by the
1111 input font appear as black boxes. The
1112 .M dvips 1
1113 processor will also print a warning when encountering these glyphs. For
1114 example:
1115 .nf
1116 % WARNMISSING yes
1117 .fi
1118 .PP
1119 The
1120 .BR \-\-unicoding ,
1121 .BR \-\-ligkern ,
1122 .BR \-\-position ,
1123 .BR \-\-coding\-scheme ,
1124 and
1125 .B \-\-warn\-missing
1126 options add UNICODING, LIGKERN/LIGKERNX, POSITION, CODINGSCHEME, and
1127 WARNMISSING commands to an encoding, and can override commands in the
1128 encoding itself. Some common encoding files have commands that are
1129 inappropriate for OpenType fonts; for example, "t1.enc" hard-codes
1130 f-ligatures, which can cause problems with small-cap fonts. Supply the
1131 .B \-\-no\-encoding\-commands
1132 option to ignore all commands from the encoding file. Commands from
1133 options like
1134 .B \-\-ligkern
1135 are processed in any case.
1136 '
1137 .SS New Glyphs
1138 .PP
1139 New glyphs, such as ligatures and contextual substitutions, are added to
1140 the encoding in any empty spaces, using their original locations when
1141 possible. If the encoding doesn't have enough space for all new glyphs,
1142 shorter ligatures composed of unaccented letters get precedence.
1143 '
1144 .SS Synthetic Glyphs
1145 .PP
1146 .B Otftotfm
1147 can synthesize some glyphs using virtual font manipulations, if a required
1148 glyph is not available in the input font. Specifically, it will synthesize:
1149 .Sp
1150 .PD 0
1151 .TP 22
1152 cwm
1153 TeX's compound word mark (a zero-width "strut" rule with height equal to the font's x-height)
1154 .TP
1155 ascendercompwordmark
1156 "cwm" with height equal to the font's ascenders
1157 .TP
1158 capitalcompwordmark
1159 "cwm" with height equal to the font's capitals
1160 .TP
1161 visualspace
1162 A square cup used to represent spaces
1163 .TP
1164 dotlessj
1165 A dotless "j", synthesized with
1166 .M t1dotlessj 1
1167 .TP
1168 dblbracketleft
1169 Kerned version of "[["
1170 .TP
1171 dblbracketright
1172 Kerned version of "]]"
1173 .TP
1174 bardbl
1175 The parallel symbol "||"
1176 .TP
1177 asteriskmath
1178 Vertically-centered "*"
1179 .TP
1180 ringfitted
1181 Ring accent centered on the width of "A"
1182 .TP
1183 twelveudash
1184 2/3-em-wide dash
1185 .TP
1186 threequartersemdash
1187 3/4-em-wide dash
1188 .TP
1189 centigrade
1190 "(degrees)C"
1191 .TP
1192 interrobang
1193 Combined "?!" symbol
1194 .TP
1195 interrobangdown
1196 Inverted interrobang
1197 .TP
1198 pertenthousand
1199 Per-ten-thousand sign (% with two extra 0s)
1200 .TP
1201 IJ
1202 "IJ" ligature
1203 .TP
1204 ij
1205 "ij" ligature
1206 .TP
1207 Germandbls
1208 "SS" (a capital sharp-s)
1209 .TP
1210 SSsmall
1211 Small-capital version of "SS"
1212 .TP
1213 FFsmall
1214 Small-capital version of "FF"
1215 .TP
1216 FIsmall
1217 Small-capital version of "FI"
1218 .TP
1219 FLsmall
1220 Small-capital version of "FL"
1221 .TP
1222 FFIsmall
1223 Small-capital version of "FFI"
1224 .TP
1225 FFLsmall
1226 Small-capital version of "FFL"
1227 .PD
1228 '
1229 '
1230 .SH "GLYPH PATTERNS"
1231 .LP
1232 The
1233 .BR \-\-include\-subs
1234 and
1235 .BR \-\-include\-alternates
1236 options, and their
1237 .B \-\-exclude
1238 and
1239 .B \-\-*\-filter
1240 variants, accept the following types of pattern.
1241 .Bp
1242 Glyph names. Example: "Aacute". For PostScript-flavored fonts, use
1243 .M otfinfo 1 's
1244 .B \-g
1245 option to see a font's glyph names, and "\fBcfftot1\fR \fIfont\fR.otf |
1246 \fBt1testpage\fR" to generate a PostScript file showing each glyph.
1247 .Bp
1248 Glyph name patterns using the shell-style glob-matching rules: "*" matches
1249 any number of characters, "?" matches any single character, and "[...]"
1250 matches any character in a set. Example: "*.end".
1251 .Bp
1252 Unicode category properties in angle brackets. Examples: "<Letter>",
1253 "<UppercaseLetter>", "<Lu>". The complete list of both short and long
1254 names: Letter/L, UppercaseLetter/Lu, LowercaseLetter/Ll,
1255 TitlecaseLetter/Lt, ModifierLetter/Lm, OtherLetter/Lo; Number/N,
1256 DecimalNumber/Nd, LetterNumber/Nl, OtherNumber/No; Punctuation/P,
1257 ConnectorPunctuation/Pc, DashPunctuation/Pd, OpenPunctuation/Ps,
1258 ClosePunctuation/Pe, InitialPunctuation/Pi, FinalPunctuation/Pf,
1259 OtherPunctuation/Po; Symbol/S, MathSymbol/Sm, CurrencySymbol/Sc,
1260 ModifierSymbol/Sk, OtherSymbol/So; Mark/M, SpacingMark/Mc,
1261 EnclosingMark/Me, NonspacingMark/Mn; Separator/Z, SpaceSeparator/Zs,
1262 LineSeparator/Zl, ParagraphSeparator/Zp; Other/C, Surrogate/Cs, Format/Cf,
1263 Control/Cc, PrivateUse/Co, Unassigned/Cn. Category values current as of
1264 Unicode 4.0.
1265 .Bp
1266 Unicode ranges. Example: "U+007f-U+008C".
1267 .PP
1268 The "!" prefix negates a pattern, and you can separate multiple patterns by
1269 spaces.
1270 '
1271 .SH "FEATURE DIRECTORY"
1272 .LP
1273 This section lists features common to Western OpenType fonts and describes
1274 how
1275 .B otftotfm
1276 handles them for common fonts. Please send the author mail if
1277 .B otftotfm
1278 does not handle a feature you need, or you believe it handles some feature
1279 incorrectly.
1280 .Sp
1281 .PD 0
1282 .TP 5
1283 .IR aalt ", Access All Alternates"
1284 Lets the user choose between all available alternate forms for a character.
1285 This includes things like superscript and subscript variants, different
1286 styles (swash, for example), and even ornaments. The
1287 .BR \-\-altselector\-feature= aalt
1288 option can help an
1289 .BR \-\-altselector\-char
1290 provide useful access to alternates, but the
1291 .I aalt
1292 feature isn't usually useful on its own. Try the
1293 .IR salt " and " calt
1294 features instead.
1295 .TP 5
1296 .IR c2sc ", Small Capitals From Capitals"
1297 Replaces capital letters with small capitals: a sort of converse of the
1298 more conventional
1299 .I smcp
1300 feature, which replaces lower-case letters with small capitals. Supported.
1301 .TP 5
1302 .IR calt ", Contextual Alternates"
1303 Lets the user choose between context-appropriate swash forms for each
1304 character. For example, given the word "DREW" in a cursive typeface, the "R
1305 E W" might be translated to calmer forms than the initial "D". There may be
1306 more than one choice for a given letter, in which case the user should be
1307 able to select among them. TeX can't support complex contextual alternates,
1308 or alternate selection, but
1309 .B otftotfm
1310 supports some fonts quite well. The input encoding should have lots of
1311 empty space for variants, and it should specify a boundary character. See
1312 also
1313 .IR cswh .
1314 .TP 5
1315 .IR case ", Case-Sensitive Forms"
1316 Shifts punctuation marks up to a position that works well with
1317 all-capital-letter sequences. For example, the hyphen character, which
1318 generally centers vertically on the x-height, is raised up to center
1319 vertically on a capital letter. Also replaces text figures with lining
1320 figures, and accent marks with forms more appropriate for capitals.
1321 Supported.
1322 .TP 5
1323 .IR cpsp ", Capital Spacing"
1324 Adds a bit of space on either side of each capital letter. Supported.
1325 (However, the OpenType tag registry suggests that
1326 .I cpsp
1327 be on by default, but applying to all-caps text only; TeX cannot easily
1328 implement that contextual intelligence.)
1329 .TP 5
1330 .IR cswh ", Contextual Swash"
1331 Lets the user choose between context-appropriate swash forms for each
1332 character. For example, in the words "Ab AC", the first "A" might be
1333 translated to a swash form, while the second might not. There may be more
1334 than one choice for a given letter, in which case the user should be able
1335 to select among them.
1336 .B Otftotfm
1337 supports some fonts quite well. The input encoding should have lots of
1338 empty space for swash variants, and it should specify a boundary
1339 character. See also
1340 .IR calt " and " swsh .
1341 .TP 5
1342 .IR dlig ", Discretionary Ligatures"
1343 Activates uncommon ligatures, such as "c_t", "s_p", and "s_t". Supported.
1344 .TP 5
1345 .IR dnom ", Denominators"
1346 Replaces digits and some punctuation marks with smaller forms sitting on
1347 the baseline, intended for fraction denominators. Supported.
1348 .TP 5
1349 .IR fina ", Terminal Forms"
1350 Substitutes appropriate forms for letters occurring at the ends of words.
1351 This feature doesn't select swash variants; it's intended for normal use,
1352 and the specification recommends that it be on by default. Partially
1353 supported: TeX will only treat spaces as the ends of words, where a correct
1354 implementation would probably include punctuation too. See
1355 .IR cswh
1356 for selecting swash variants active at the ends of words.
1357 .TP 5
1358 .IR frac ", Fractions"
1359 Replaces simple sequences like "1/2" with nice-looking fractions.
1360 Supported, but beware: many fonts will translate "11/32" into "1" + "1/3" +
1361 "2".
1362 .TP 5
1363 .IR hist ", Historical Forms"
1364 Replaces characters with historical variants. Usually, this means at least
1365 translating regular "s" to long "s". Supported.
1366 .TP 5
1367 .IR kern ", Kerning"
1368 Adjusts the space between characters (pair kerning). Generally supported,
1369 and you should probably turn it on. As a special case, "\fB\-f\fRkern" can
1370 also read kerning information from the "kern" table in conventional
1371 TrueType fonts.
1372 .TP 5
1373 .IR liga ", Standard Ligatures"
1374 Activates common ligatures, such as "f_f", "f_i", "f_f_j", and (in some
1375 Adobe fonts) "T_h". Generally supported, and you should probably turn it
1376 on.
1377 .TP 5
1378 .IR lnum ", Lining Figures"
1379 Uses lining figures, the set of digits that are all about as high as
1380 capital letters.
1381 Supported. Compare
1382 .IR onum ;
1383 see also
1384 .IR pnum
1385 and
1386 .IR tnum.
1387 .TP 5
1388 .IR numr ", Numerators"
1389 Replaces digits and some punctuation marks with smaller, raised forms
1390 intended for fraction numerators. Supported, but not usually useful.
1391 .TP 5
1392 .IR onum ", Oldstyle Figures"
1393 Uses old-style figures, also known as text figures. This is the set of
1394 digits that have ascenders and descenders like lower-case letters.
1395 Supported. Compare
1396 .IR lnum ;
1397 see also
1398 .IR pnum
1399 and
1400 .IR tnum .
1401 .TP 5
1402 .IR ordn ", Ordinals"
1403 Designed for Spanish and French. Replaces ordinal numbers, such as "2.o",
1404 with forms where the "o" is raised, and replaces the sequence "No" with an
1405 integrated glyph. Supported.
1406 .TP 5
1407 .IR ornm ", Ornaments"
1408 Replaces some alphabetic characters in the font with ornaments, and links
1409 the bullet character to a set of all bullet-like ornaments, from which the
1410 user can choose. Partially supported: TeX can handle alphabetic
1411 substitutions, but not bullet choice.
1412 .TP 5
1413 .IR pnum ", Proportional Figures"
1414 Digits will have different widths. Supported. Compare
1415 .IR tnum ;
1416 see also
1417 .IR lnum
1418 and
1419 .IR onum.
1420 .TP 5
1421 .IR salt ", Stylistic Alternates"
1422 Lets the user choose between stylistic alternate forms for a character.
1423 The
1424 .BR \-\-altselector\-char
1425 mechanism provides useful access to this feature. If you turn on
1426 .IR salt
1427 globally,
1428 .B otftotfm
1429 takes the first alternate form whenever there's more than one choice. See
1430 also
1431 .IR aalt
1432 and
1433 .IR ss01 ;
1434 .IR salt
1435 is generally more useful than
1436 .IR aalt
1437 for TeX, since it refers exclusively to stylistic alternates.
1438 .TP 5
1439 .IR sinf ", Scientific Inferiors"
1440 Replaces digits and some punctuation marks with smaller, lowered forms
1441 intended for subscripts. Supported. Compare
1442 .IR subs .
1443 .TP 5
1444 .IR size ", Optical Size"
1445 This feature stores information about the range of optical sizes for which
1446 the font was intended. There is no point in selecting it with
1447 .BR otftotfm ,
1448 since it should not change the font's appearance in any way.
1449 .TP 5
1450 .IR smcp ", Small Capitals"
1451 Replaces lower-case letters with small capitals. Supported. Compare
1452 .IR c2sc .
1453 .TP 5
1454 .IR ss01 - ss20 ", Stylistic Sets 1-20"
1455 Replaces characters with a uniform set of stylistic alternates. Differs
1456 from features like
1457 .I salt
1458 in that a Stylistic Set is uniform: an
1459 .I ssXX
1460 feature should never involve selection from a set of possible alternate
1461 characters. Supported.
1462 .TP 5
1463 .IR subs ", Subscript"
1464 Replaces characters with smaller, lowered forms intended for subscripts.
1465 Supported. Compare
1466 .IR sinf ;
1467 some fonts support
1468 .I sinf
1469 but not
1470 .IR subs .
1471 .TP 5
1472 .IR sups ", Superscript"
1473 Replaces digits, some punctuation marks, and some lower-case letters with
1474 smaller, raised forms intended for superscripts. Supported.
1475 .TP 5
1476 .IR swsh ", Swash"
1477 Activates all swash forms for each character. There may be more than one
1478 swash form, in which case
1479 .B otftotfm
1480 will pick the first one listed. Supported, except that swash variants
1481 other than the first are inaccessible. Note that some fonts with swash
1482 variants support the
1483 .I cswh
1484 feature exclusively.
1485 .TP 5
1486 .IR tnum ", Tabular Figures"
1487 All digits will have the same width, so that tables and the like will align
1488 visually. Supported. Compare
1489 .IR pnum ;
1490 see also
1491 .IR lnum
1492 and
1493 .IR onum.
1494 .TP 5
1495 .IR zero ", Slashed Zero"
1496 Replaces the zero character with a slashed zero. Supported.
1497 .PD
1498 '
1499 .SH "DIAGNOSTICS AND TROUBLESHOOTING"
1500 '
1501 .TP 5
1502 no writable directory found in $TEXMF
1503 '
1504 .B Otftotfm
1505 could not find a writable directory in your $TEXMFVAR or $TEXMF path. Did
1506 you create a
1507 .I $HOME/.texmf-var
1508 or
1509 .I $HOME/texmf
1510 directory? If so, run the command "kpsewhich \-\-expand\-path='$TEXMF'" to
1511 verify that directory is not being found. You may need to set your TEXMF
1512 environment variable, to \&'{!!'"$HOME"'/texmf,!!$TEXMFMAIN}', for instance
1513 (note the different kinds of quotes; on my machine, this expands to
1514 \&'{!!/home/kohler/texmf,!!$TEXMFMAIN}').
1515 '
1516 .TP 5
1517 \&'\fIchar\fR' has no encoding, ignoring kern removal
1518 .PD 0
1519 .TP 5
1520 (or ligature removal, lig/kern removal, or ligature)
1521 .PD
1522 '
1523 These messages indicate a slight problem with your encoding file: one of
1524 the LIGKERN commands referred to a character not present in the encoding.
1525 This might be due to a misspelling in the LIGKERN command or the encoding
1526 file, or it might be an oversight. Either fix the encoding file or ignore
1527 the warning.
1528 '
1529 .TP 5
1530 can't map \&'\fIchar\fR' to Unicode
1531 '
1532 Another encoding file problem: One of the glyph names in an UNICODING block
1533 could not be converted to Unicode. This is problematic since UNICODING
1534 exists wholly to translate glyph names into Unicode. Fix the encoding file
1535 or ignore the warning.
1536 '
1537 .TP 5
1538 not enough room in encoding, ignoring \fIN\fR glyph(s) ...
1539 '
1540 There wasn't space in the encoding for all the glyphs referred to by the
1541 features you selected. For example, maybe the font had more ligatures than
1542 there were empty slots in the encoding. Fix this warning by selecting fewer
1543 features, or by using an encoding with more empty slots, such as the 7t.enc
1544 encoding distributed with
1545 .BR otftotfm .
1546 '
1547 .TP 5
1548 The \&'\fB\-a\fR' option did not install my font correctly.
1549 '
1550 Try again with the \&'\fB\-\-verbose\fR' option, which causes
1551 .BR otftotfm
1552 to explain its behavior. Note that by default,
1553 .BR otftotfm
1554 will not re-install files already present in your system's TeX search paths
1555 (in the current directory, for instance). Use \&'\fB\-\-force\fR' to
1556 override this behavior.
1557 '
1558 .SH "FREQUENTLY ASKED QUESTIONS"
1559 .TP 5
1560 How can I get a small-caps "SS" in place of the German sharp-S?
1561 '
1562 Supply the option \&'\fB\-\-unicoding\fR "germandbls =: SSsmall"'.
1563 '
1564 .TP 5
1565 How can I prevent f-ligatures from forming in a small-caps font?
1566 '
1567 This should happen automatically, but some overzealous encoding files add
1568 f-ligatures even when the font doesn't request them. Try the
1569 "\fB\-\-no\-encoding\-commands\fR" option if this is a problem for you.
1570 '
1571 .TP 5
1572 \fBOtftotfm\fR seems to take a long time.
1573 '
1574 Use the
1575 .B \-V
1576 option to see what it's doing. Often the culprit is the
1577 .M updmap 1
1578 program; if you're planning to run
1579 .B otftotfm
1580 multiple times, give it the
1581 .B \-\-no\-updmap
1582 option and run
1583 .B updmap
1584 manually when you're done.
1585 '
1586 .TP 5
1587 How can I refer to the different forms of phi?
1588 '
1589 \fBOtftotfm\fR follows TeX practice and widely-distributed TeX encoding
1590 vectors, so "/phi" in an input encoding vector should map to a "straight"
1591 phi and "/phi1" should map to a "loopy" phi. Note that TeX practice
1592 differs from the PostScript standard naming conventions, in which "/phi" is
1593 "loopy" and "/phi1" is "straight"; this means that \fBotftotfm\fR may map
1594 "/phi" in an input encoding vector to a font's "/phi1" glyph, and vice
1595 versa. Perhaps most unambiguously, you can use "/uni03D5" for the
1596 "straight" form and "/uni03C6" for the "loopy" form.
1597 '
1598 .TP 5
1599 How can I get lining figures (that is, normal line-height digits) with small caps ('\fB\-f\fRsmcp')?
1600 '
1601 Many fonts use old-style figures by default with small caps. Since the
1602 default is not specified, it's wise to explicitly supply \&'\fB\-f\fRlnum' or
1603 \&'\fB-f\fRonum'.
1604 '
1605 .SH "BUGS"
1606 .\" .LP
1607 .\" Presumably some context-sensitive positionings and ligatures could be
1608 .\" implemented with TeX's boundary character, but
1609 .\" .B otftotfm
1610 .\" doesn't do that yet.
1611 .LP
1612 See the documentation for
1613 .B \-\-pl
1614 above if you have problems running
1615 .BR otftotfm 's
1616 output through
1617 .BR fontinst .
1618 '
1619 .SH "SEE ALSO"
1620 .LP
1621 .M pltotf 1 ,
1622 .M tftopl 1 ,
1623 .M vptovf 1 ,
1624 .M afm2tfm 1 ,
1625 .M dvips 1 ,
1626 .M cfftot1 1 ,
1627 .M otfinfo 1 ,
1628 .M t1dotlessj 1 ,
1629 .M t1testpage 1 ,
1630 .M ttftotype42 1 ,
1631 .M kpsewhich 1 ,
1632 .M updmap 1
1633 .LP
1634 .I "Adobe Type 1 Font Format"
1635 .LP
1636 Adobe Technical Notes #5176,
1637 .IR "The Compact Font Format Specification" ,
1638 and #5177,
1639 .I "The Type 2 Charstring Format"
1640 .LP
1641 .IR "OpenType Specification" ,
1642 Version 1.4
1643 .LP
1644 .IR "A Directory Structure for TeX Files" ,
1645 http://www.tug.org/tds/
1646 .LP
1647 .IR "Kpathsea: A library for path searching" ,
1648 http://www.tug.org/kpathsea/
1649 .LP
1650 Sivan Toledo,
1651 .IR "Exploiting Rich Fonts" ,
1652 TUGboat 21(2), 2000,
1653 http://www.tug.org/TUGboat/Articles/tb21-2/tb67tole.pdf
1654 .LP
1655 Michel Goossens, Frank Mittelbach, and Alexander Samarin,
1656 .IR "The LaTeX Companion"
1657 (for information on the .fd file format)
1658 .LP
1659 Adobe Systems, "Unicode and Glyph Names". Refers to the glyphlist.txt file
1660 used to translate glyph names to Unicode code points.
1661 http://partners.adobe.com/public/developer/opentype/index_glyph.html
1662 '
1663 .SH AUTHOR
1664 Eddie Kohler ([email protected])
1665 .PP
1666 Thanks to Karl Berry, Marco Kuhlmann, Adam Lindsay, Bruce D'Arcus, Thomas
1667 Esser, Claire Connelly, Nelson H.F. Beebe, and Ryuji Suzuki for
1668 suggestions, bug reports, and help. Particular thanks to Achim Blumensath
1669 and Michael Zedler for suggestions and patches, some of them extensive.