## 1. NAME▲

autoinst - wrapper script around the LCDF TypeTools, for installing OpenType fonts in LaTeX.

## 2. SYNOPSIS ▲

autoinst [options] fontfile [fontfile ...]

## 3. DESCRIPTION ▲

Eddie Kohler's TypeTools, mainly otftotfm, are great tools for installing OpenType fonts for use with LaTeX, but their use (even in automatic mode) is quite complicated; they need lots of long command lines and don't generate the fd and sty files LaTeX needs. autoinst simplifies the font installation process by generating and executing all commands for otftotfm and by creating all necessary fd and sty files. All the user then needs to do is move these files to a suitable location (\f(CW\*(C`\$LOCALTEXMF/tex/latex/<Supplier>/<FontFamily>/\*(C'\fR is the canonical choice) and update TeX's filename database.

Given a family of font files (in either .ttf or .otf format), autoinst will create several LaTeX font families:

- 2 Four text families (with lining and oldstyle figures, in tabular and proportional variants), each with the following shapes:
.RS 2

n 4 Roman text

sc 4 Small caps

nw 4 `Upright swash'; usually normal text with some extra `oldstyle' ligatures, such as ct, sp and st.

tl 4 Titling shape. Meant for all-caps text only (even though it sometimes contains lowercase glyphs as well), where letterspacing and the positioning of punctuation characters have been adjusted to suit all-caps text. This shape is generated only for the families with lining figures.

it 4 Italic or oblique text

scit 4 Italic small caps

sw 4 Swash

tlit 4 Italic titling

- 2 For each text family: a family of TS1-encoded symbol fonts, in roman and italic shapes.

- 2 Four families with superiors, inferiors, numerators and denominators, in roman and italic shapes.

- 2 An ornament family, in roman and italic shapes.

Of course, if the font doesn't contain oldstyle figures, small caps etc., the corresponding shapes or families are not created; furthermore, the creation of most families and shapes can be controlled by command-line options (see below).

The generated font families are named <FontFamily>-<Suffix>, where <Suffix> is one of

LF 8 proportional (i.e., figures have varying widths) lining figures

TLF 8 tabular (i.e., all figures have the same width) lining figures

OsF 8 proportional oldstyle figures

TOsF 8 tabular oldstyle figures

Sup 8 superior characters (many fonts only have an incomplete set of superiors: figures, some punctuation and the letters abdeilmnorst; normal forms will be used for the other characters)

Inf 8 inferior characters; usually only figures and punctuation, normal forms for the other characters

Orn 8 ornaments

Numr 8 numerators

Dnom 8 denominators

The generated fonts are named <FontFile>-<suffix>-<shape>-<enc>, where <FontFile> is the name of the OpenType file, <suffix> is the same as above (but in lowercase), <shape> is either empty, `sc', `swash' or `titling', and <enc> is the encoding. A typical name in this scheme is MinionPro-Regular-osf-sc-ly1.

## 4. On the choice of text encoding ▲

By default, all text families use the LY1 encoding. This has been chosen over T1 (Cork) because many OpenType fonts contain additional ligatures such as fj and Th, and LY1 has a number of empty slots to accommodate these.

A different encoding can be selected using the --encoding command line option (see below).

## 5. Using the fonts with LaTeX ▲

autoinst generates a style file for using the font in LaTeX documents, named `<FontFamily>.sty'. This style file also takes care of loading the fontenc and textcomp packages, if necessary. To use the font, simply put \f(CW\*(C`\usepackage{MinionPro}\*(C'\fR (or whatever the font is called) in the preamble of your document.

This style file defines a number of options:

lining, oldstyle, tabular, proportional 4 Choose which figures will be used for the text fonts. The defaults are `oldstyle' and `proportional' (if available).

ultrablack, ultrabold, heavy, extrablack, black, extrabold, demibold, semibold, bold 4 Choose the weight that LaTeX will use for the `bold' weight (i.e., the value of \f(CW\*(C`\bfdefault\*(C'\fR).

light, medium, regular 4 Choose the weight that LaTeX will use for the `regular' weight (i.e., the value of \f(CW\*(C`\mddefault\*(C'\fR).

scaled=<scale> 4 Scale the font by a factor of <scale>. For example: to increase the size of the font by 5%, use the command \f(CW\*(C`\usepackage[scaled=1.05]{MyriadPro}\*(C'\fR. .Sp This option is only available when the xkeyval package is found in your TeX installation.

The style file will also try to load the fontaxes package (part of the MinionPro for LaTeX project), which gives easy access to various font shapes and styles. This package can be downloaded from the project's homepage (http://developer.berlios.de/projects/minionpro) or directly through the CVS web interface (http://cvs.berlios.de/cgi-bin/viewcvs.cgi/minionpro/MinionPro/tex/), and is also available from CTAN as part of the archive base-v2.zip (http://www.ctan.org/tex-archive/fonts/minionpro/base-v2.zip).

Using the machinery set up by fontaxes, the generated style file also defines a few commands (which take the text to be typeset as argument) and declarations (which don't take arguments, but affect all text up to the end of the current group) of its own:

DECLARATION COMMAND SHORT FORM OF COMMAND \tlshape \texttitling \texttl \sufigures \textsuperior \textsu \infigures \textinferior \textin

In addition, the \f(CW\*(C`\swshape\*(C'\fR and \f(CW\*(C`\textsw\*(C'\fR commands are redefined to place swash on the secondary shape axis (fontaxes places it on the primary shape axis); this allows the use of `upright swash'. Just saying \f(CW\*(C`\swshape\*(C'\fR will still give normal (italic) swash, but \f(CW\*(C`\swshape\upshape\*(C'\fR results in upright swash.

Note that there is no separate command for accessing the italic titling shape; but these commands behave properly when nested, so \f(CW\*(C`\tlshape\itshape\*(C'\fR gives italic titling. There are also no commands for accessing the numerator and denominator fonts; these can be selected using fontaxes' low-level commands, e.g., \f(CW\*(C`\fontfigurestyle{numerator}\selectfont\*(C'\fR.

The style file also provides a command \f(CW\*(C`\ornament{\f(CI<number>\f(CW}\*(C'\fR, where \f(CW\*(C`\f(CI<number>\f(CW\*(C'\fR is a number from 0 to the total number of ornaments minus one. Ornaments are always typeset using the current family, series and shape. A list of all ornaments in a font can be created by running LaTeX on the file nfssfont.tex (part of a standard LaTeX installation) and specifying the ornament font (e.g., MinionPro-Regular-orn-u).

This whole machinery builds on fontaxes; if that package cannot be found, the style file doesn't provide high-level access to the more `exotic' font shapes and styles. In that case, you're limited to using the lower-level commands from standard NFSS, or even plain TeX's \f(CW\*(C`\font\*(C'\fR primitive (and it's called `primitive' for a reason!)

## 6. Using multiple font families in one document ▲

If you want to use several font families in one document, make sure all fonts were installed using the same version of autoinst. autoinst has seen some non-backward-compatible changes in the past, and .sty and .fd files that were generated by different versions of autoinst may not be able to coexist peacefully.

## 7. NFSS codes ▲

In NFSS, weight and width are concatenated into a single `series' attribute. (Note: versions of autoinst before 2007-07-27 erroneously formed the series as `width plus weight' instead of the reverse.) autoinst maps widths, weights and shapes to NFSS codes using the following tables. These are based on the tables in Lehman's Font Installation Guide, but some changes had to be made to avoid name clashes for font families with many different widths and weights (such as Helvetica Neue).

WEIGHT WIDTH Thin t Ultra Condensed uc Ultra Light ul Extra Condensed ec Extra Light el Condensed c Light l Semicondensed sc Book [1] Regular [1] Regular [1] Semiextended sx Medium mb Extended x Demibold db Semibold sb Bold b Extra Bold eb SHAPES Black a Extra Black ea Roman n Heavy h Italic it Ultra ub Oblique it [2] Ultra Bold ub RomanI n [3] Ultra Black ua RomanII it [3]

[1] 4 When both weight and width are empty, the `series' attribute becomes `m'.

[2] 4 Mapping the `Oblique' shape to `it' instead of the canonical `sl' simplifies autoinst. Since font families with both `Italic' and `Oblique' shapes probably do not exist (apart from Computer Modern), this shouldn't cause problems in real life.

[3] 4 To the best of my knowledge, the only font family that has two `Roman' shapes is Silentium; since this has no `Italic' shape, the `it' code is (ab)used for the `RomanII' shape.

## 8. A note for MikTeX users ▲

Calling otftotfm with the --automatic option (as autoinst does by default) requires a TeX-installation that uses the kpathsea library; with TeX-installations that implement their own directory searching (such as MiKTeX) otftotfm might complain that it cannot find a writable texmf directory and leave all generated tfm, vf, enc and map files in the current working directory. In that case, you need to move these to their correct destinations. You also need to tell the dvi-driver (dvips, dvipdfm, pdfTeX etc.) about the new font map files; this usually means editing some configuration file.

Furthermore, some OpenType fonts lead to pl and vpl files that are too big for MiKTeX's pltotf and vptovf; the versions that come with TeXLive (http://tug.org/ftp/texlive/Contents/live/bin/win32/) don't have this problem.

## 9. COMMAND-LINE OPTIONS ▲

--encoding=encoding[,encoding] 4 Use the encoding encoding for the text fonts. The default is `LY1'. A file named `<encoding>.enc' (in all lowercase) should be somewhere where otftotfm can find it. Suitable encoding files for LY1, OT1 and T1/TS1 come with fontools. (Note that these files are called fontools_xxx.enc to avoid name clashes with other packages; the `fontools_' prefix doesn't need to be specified.) .Sp Multiple text encodings can be specified as well: \f(CW\*(C` --encoding=OT1,T1,LY1\*(C'\fR. The encodings are passed to fontenc in the order specified, so the last one will be the default text encoding.

--sanserif 4 Install the font as a sanserif font, accessed via \f(CW\*(C`\sffamily\*(C'\fR and \f(CW\*(C`\textsf\*(C'\fR. Note that the generated style file redefines \f(CW\*(C`\familydefault\*(C'\fR, so including it will make this font the default text font.

--typewriter 4 Install the font as a typewriter font, accessed via \f(CW\*(C`\ttfamily\*(C'\fR and \f(CW\*(C`\texttt\*(C'\fR. Note that the generated style file redefines \f(CW\*(C`\familydefault\*(C'\fR, so including it will make this font the default text font.

--ts1 4

--nots1 4 Turn the creation of TS1-encoded fonts on or off. The default is --ts1 if the text encodings (see --encoding above) include T1, --nots1 otherwise.

--smallcaps 4

--nosmallcaps 4 Turn the creation of small caps fonts on or off. The default is --smallcaps.

--swash 4

--noswash 4 Turn the creation of swash fonts on or off. The default is --swash.

--titling 4

--notitling 4 Turn the creation of titling fonts on or off. The default is --notitling.

--superiors 4

--nosuperiors 4 Turn the creation of fonts with superior characters on or off. The default is --superiors.

--inferiors 4

--noinferiors 4 Turn the creation of fonts with inferior figures on or off. The default is --noinferiors.

--fractions 4

--nofractions 4 Turn the creation of fonts with numerators and denominators on or off. The default is --nofractions.

--ornaments 4

--noornaments 4 Turn the creation of ornament fonts on or off. The default is --ornaments.

--manual 4 Manual mode. By default, autoinst immediately executes all otftotfm command lines it generates; with the --manual option, these commands are instead written to a batch command file (named `<font>.bat', to make things easier for our friends on Windows). Also, the generated otftotfm command lines specify the --pl option and leave out the --automatic option; this causes human readable (and editable) pl and vpl files to be created instead of the default tfm and vf files.

--verbose 4 Verbose mode; print detailed info about what autoinst thinks it's doing.

--extra=text 4 Pass text as options to otftotfm. To prevent text from accidentily being interpreted as options to autoinst, it should be properly quoted.

Eddie Kohler's TypeTools (http://www.lcdf.org/type).

Perl is usually pre-installed on Linux and Unix systems; for Windows, good (and free) Perl implementations are Strawberry Perl (http://strawberryperl.com) and ActivePerl (available from http://www.activestate.com);

John Owens' otfinst (http://www.ece.ucdavis.edu/~jowens/code/otfinst/; also available from CTAN) is another wrapper around otftotfm, and may work for you when autoinst doesn't.

Ready-made support files for MinionPro, providing more options and features than autoinst ever will (including math), are available from http://developer.berlios.de/projects/minionpro/.

XeTeX (http://scripts.sil.org/xetex) is a TeX extension that can use any font installed in the operating system (including both flavours of OpenType fonts) without additional support files. It also isn't hindered by standard TeX's limitation to 8-bit fonts, so it is especially well suited to fonts with many ligatures and alternate glyphs, such as Bickham, Poetica and Zapfino.

## 11. AUTHOR ▲

Marc Penninga <>

When sending a bug report, please give as much relevant information as possible; this usually includes (but may not be limited to) the output from running autoinst with the --verbose option. Please make sure that this output includes all error messages (if any); this can be done using the command

autoinst (... all options and files ...) >autoinst.log 2>&1

This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.

A copy of the GNU General Public License is included with the fontools collection; see the file GPLv2.txt.

## 14. DISCLAIMER ▲

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

## 15. RECENT CHANGES ▲

(See the source code for the full story.)

2009-04-09 12 Prefixed the filenames of the included encoding files with `fontools_', to prevent name clashes with other packages.

2009-04-06 12 A small patch to the make_ornament_encoding subroutine; it now also recognises the bullet.xxx ornament glyphs in Adobe's Kepler Pro.