| 1 |
%%% ==================================================================== |
| 2 |
%%% @LaTeX-file{ |
| 3 |
%%% author = "Alan Jeffrey and Rowland McDonnell and |
| 4 |
%%% Ulrik Vieth and Lars Hellstr{\"o}m", |
| 5 |
%%% version = "1.927", |
| 6 |
%%% date = "28 July 2004", |
| 7 |
%%% time = "23:20:27 CEST", |
| 8 |
%%% filename = "intro98.tex", |
| 9 |
%%% email = "[email protected]", |
| 10 |
%%% checksum = "", |
| 11 |
%%% codetable = "ISO/ASCII", |
| 12 |
%%% keywords = "fontinst, TeX, PostScript, documentation", |
| 13 |
%%% supported = "yes", |
| 14 |
%%% abstract = "This is documentation for the fontinst |
| 15 |
%%% font installation package.", |
| 16 |
%%% package = "fontinst", |
| 17 |
%%% dependencies = "ltxguide.cls, url.sty, xspace.sty" |
| 18 |
%%% } |
| 19 |
%%% ==================================================================== |
| 20 |
|
| 21 |
% Copyright 1993, 1994, 1995, 1996 Alan Jeffrey |
| 22 |
|
| 23 |
% Modified by Rowland McDonnell June 1998 |
| 24 |
% Modified and revised by Ulrik Vieth June 1998 |
| 25 |
|
| 26 |
\documentclass[a4paper]{ltxguide} |
| 27 |
\usepackage[OT1]{fontenc} |
| 28 |
\usepackage{url,xspace} |
| 29 |
\usepackage{graphicx} |
| 30 |
%\renewcommand\rmdefault{ppl} |
| 31 |
%\renewcommand\rmdefault{padx} |
| 32 |
%\renewcommand\rmdefault{pmnx} |
| 33 |
|
| 34 |
|
| 35 |
% Title page and running heads. |
| 36 |
|
| 37 |
\makeatletter |
| 38 |
\newcommand{\subtitle}[1]{\renewcommand{\@subtitle}{#1}} |
| 39 |
\newcommand{\version}[1]{\renewcommand{\@version}{#1}} |
| 40 |
\newcommand{\illustration}[1]{\renewcommand{\@illustration}{#1}} |
| 41 |
|
| 42 |
\newcommand{\@subtitle}{} |
| 43 |
\newcommand{\@version}{???} |
| 44 |
\newcommand{\@illustration}{cover.eps} |
| 45 |
|
| 46 |
\pagestyle{myheadings} |
| 47 |
\AtBeginDocument{\markright{\small\itshape |
| 48 |
\@author\hfill\@title: \@subtitle\quad}} |
| 49 |
|
| 50 |
|
| 51 |
\renewcommand{\maketitle}{{% |
| 52 |
\thispagestyle{empty}% |
| 53 |
\normalfont\centering |
| 54 |
\null |
| 55 |
{\fontsize{100}{100}\textit{\@title}}% |
| 56 |
\par\bigskip |
| 57 |
{\Large\textbf{\@subtitle}}% |
| 58 |
\vfill |
| 59 |
\includegraphics[width=\textwidth]{\@illustration}% |
| 60 |
\vfill |
| 61 |
{\Large\textbf{% |
| 62 |
\@author\\[\smallskipamount] \@title~v\@version |
| 63 |
\quad\textperiodcentered\quad \@date}}% |
| 64 |
\clearpage |
| 65 |
}} |
| 66 |
\makeatother |
| 67 |
|
| 68 |
|
| 69 |
% Set lists tighter (assuming non-zero \parskip). |
| 70 |
|
| 71 |
\makeatletter |
| 72 |
\renewcommand{\@listI}{% |
| 73 |
\leftmargin\leftmargini |
| 74 |
\parsep\medskipamount |
| 75 |
\itemsep\z@ % + parsep |
| 76 |
\topsep\z@ % + parskip |
| 77 |
\partopsep\z@ |
| 78 |
} |
| 79 |
\makeatother |
| 80 |
|
| 81 |
% Set spacing around captions. |
| 82 |
|
| 83 |
\setlength{\abovecaptionskip}{\medskipamount} |
| 84 |
\setlength{\belowcaptionskip}{\medskipamount} |
| 85 |
|
| 86 |
% Markup for logos, file types, programs, etc. |
| 87 |
|
| 88 |
\newcommand*{\cs}[1]{\texttt{\char`\\ #1}\xspace} |
| 89 |
|
| 90 |
\newcommand*{\OzTeX}{O\kern-.03em z\kern-.15em\TeX} |
| 91 |
\newcommand*{\OzMF}{O\kern-.03em zMF} |
| 92 |
\newcommand*{\OzTools}{O\kern-.03em z\kern-.15em Tools} |
| 93 |
|
| 94 |
\newcommand{\PS}{Post\-Script\xspace} |
| 95 |
\newcommand{\TT}{True\-Type\xspace} |
| 96 |
|
| 97 |
\newcommand*{\setfilename}[1]{\texttt{#1}} |
| 98 |
\newcommand*{\setdotfilename}[1]{\setfilename{.#1}} |
| 99 |
\newcommand*{\setpackagename}[1]{\textsc{#1}} |
| 100 |
|
| 101 |
\newcommand{\dvips} {\setpackagename{dvips}\xspace} |
| 102 |
\newcommand{\Dvips} {\setpackagename{Dvips}\xspace} |
| 103 |
\newcommand{\fontinst}{\setpackagename{font\-inst}\xspace} |
| 104 |
\newcommand{\Fontinst}{\setpackagename{Font\-inst}\xspace} |
| 105 |
|
| 106 |
% \show\fontname |
| 107 |
\newcommand{\fontnamekb}{fontname\xspace} |
| 108 |
\newcommand{\Fontnamekb}{Fontname\xspace} |
| 109 |
|
| 110 |
\newcommand{\mf} {\setfilename{mf}\xspace} |
| 111 |
\newcommand{\Mf} {\setfilename{Mf}\xspace} |
| 112 |
\newcommand{\vf} {\setfilename{vf}\xspace} |
| 113 |
\newcommand{\Vf} {\setfilename{Vf}\xspace} |
| 114 |
\newcommand{\pl} {\setfilename{pl}\xspace} |
| 115 |
\newcommand{\Pl} {\setfilename{Pl}\xspace} |
| 116 |
\newcommand{\fd} {\setfilename{fd}\xspace} |
| 117 |
\newcommand{\Fd} {\setfilename{Fd}\xspace} |
| 118 |
\newcommand{\pk} {\setfilename{pk}\xspace} |
| 119 |
\newcommand{\Pk} {\setfilename{Pk}\xspace} |
| 120 |
\newcommand{\afm}{\setfilename{afm}\xspace} |
| 121 |
\newcommand{\Afm}{\setfilename{Afm}\xspace} |
| 122 |
\newcommand{\vpl}{\setfilename{vpl}\xspace} |
| 123 |
\newcommand{\Vpl}{\setfilename{Vpl}\xspace} |
| 124 |
\newcommand{\tfm}{\setfilename{tfm}\xspace} |
| 125 |
\newcommand{\Tfm}{\setfilename{Tfm}\xspace} |
| 126 |
\newcommand{\mtx}{\setfilename{mtx}\xspace} |
| 127 |
\newcommand{\Mtx}{\setfilename{Mtx}\xspace} |
| 128 |
\newcommand{\etx}{\setfilename{etx}\xspace} |
| 129 |
\newcommand{\Etx}{\setfilename{Etx}\xspace} |
| 130 |
\newcommand{\pfa}{\setfilename{pfa}\xspace} |
| 131 |
\newcommand{\Pfa}{\setfilename{Pfa}\xspace} |
| 132 |
\newcommand{\pfb}{\setfilename{pfb}\xspace} |
| 133 |
\newcommand{\Pfb}{\setfilename{Pfb}\xspace} |
| 134 |
\newcommand{\dvi}{\setfilename{dvi}\xspace} |
| 135 |
\newcommand{\Dvi}{\setfilename{Dvi}\xspace} |
| 136 |
\newcommand{\ttf}{\setfilename{ttf}\xspace} |
| 137 |
\newcommand{\Ttf}{\setfilename{Ttf}\xspace} |
| 138 |
|
| 139 |
\newcommand{\vftovp}{\setpackagename{vftovp}\xspace} |
| 140 |
\newcommand{\vptovf}{\setpackagename{vptovf}\xspace} |
| 141 |
\newcommand{\pltotf}{\setpackagename{pltotf}\xspace} |
| 142 |
\newcommand{\tftopl}{\setpackagename{tftopl}\xspace} |
| 143 |
|
| 144 |
|
| 145 |
% Stolen from Dr Knuth |
| 146 |
\makeatletter % borrow the private macros of PLAIN (with care) |
| 147 |
\def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant |
| 148 |
\def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant |
| 149 |
% macros for font tables |
| 150 |
\def\oddline#1{\cr |
| 151 |
\noalign{\nointerlineskip} |
| 152 |
\multispan{19}\hrulefill& |
| 153 |
\setbox0=\hbox{\lower 2.3pt\hbox{\hex{#1x}}}\smash{\box0}\cr |
| 154 |
\noalign{\nointerlineskip}} |
| 155 |
\def\evenline{\cr\noalign{\hrule}} |
| 156 |
\def\chartstrut{\lower4.5pt\vbox to14pt{}} |
| 157 |
\def\beginchart#1{$$\global\count@=0 #1 |
| 158 |
\halign to\hsize\bgroup |
| 159 |
\chartstrut##\tabskip0pt plus10pt& |
| 160 |
&\hfil##\hfil&\vrule##\cr |
| 161 |
\lower6.5pt\null |
| 162 |
&&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline} |
| 163 |
\def\endchart{\raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B& |
| 164 |
&\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$} |
| 165 |
\def\*{\global\advance\count@ by1 } |
| 166 |
\def\:{\setbox0=\hbox{\char\count@}% |
| 167 |
\ifdim\ht0>7.5pt\reposition |
| 168 |
\else\ifdim\dp0>2.5pt\reposition\fi\fi |
| 169 |
\box0\global\advance\count@ by1 } |
| 170 |
\def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}} |
| 171 |
\def\smallchart{% |
| 172 |
%\global\advance\count@ by16 |
| 173 |
&\oct{00x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline0 |
| 174 |
&\oct{01x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 175 |
&\oct{02x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline1 |
| 176 |
&\oct{03x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 177 |
&\oct{04x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline2 |
| 178 |
&\oct{05x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 179 |
&\oct{06x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline3 |
| 180 |
&\oct{07x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 181 |
&\oct{10x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline4 |
| 182 |
&\oct{11x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 183 |
&\oct{12x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline5 |
| 184 |
&\oct{13x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 185 |
&\oct{14x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline6 |
| 186 |
&\oct{15x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 187 |
&\oct{16x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline7 |
| 188 |
&\oct{17x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline} |
| 189 |
|
| 190 |
\def\bigchart{% |
| 191 |
%\global\advance\count@ by16 |
| 192 |
&\oct{00x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline0 |
| 193 |
&\oct{01x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 194 |
&\oct{02x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline1 |
| 195 |
&\oct{03x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 196 |
&\oct{04x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline2 |
| 197 |
&\oct{05x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 198 |
&\oct{06x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline3 |
| 199 |
&\oct{07x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 200 |
&\oct{10x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline4 |
| 201 |
&\oct{11x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 202 |
&\oct{12x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline5 |
| 203 |
&\oct{13x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 204 |
&\oct{14x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline6 |
| 205 |
&\oct{15x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 206 |
&\oct{16x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline7 |
| 207 |
&\oct{17x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 208 |
&\oct{20x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline8 |
| 209 |
&\oct{21x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 210 |
&\oct{22x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline9 |
| 211 |
&\oct{23x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 212 |
&\oct{24x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline{A} |
| 213 |
&\oct{25x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 214 |
&\oct{26x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline{B} |
| 215 |
&\oct{27x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 216 |
&\oct{30x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline{C} |
| 217 |
&\oct{31x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 218 |
&\oct{32x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline{D} |
| 219 |
&\oct{33x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 220 |
&\oct{34x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline{E} |
| 221 |
&\oct{35x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline |
| 222 |
&\oct{36x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline{F} |
| 223 |
&\oct{37x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline} |
| 224 |
|
| 225 |
% \font\xrm = cmr10 at 10pt % change this line to test font |
| 226 |
% \beginchart\xrm \normalchart \endchart |
| 227 |
|
| 228 |
\newcommand{\smallfontchart}[1]{% |
| 229 |
\font\xrm = #1 \beginchart\xrm \smallchart \endchart} |
| 230 |
\newcommand{\bigfontchart}[1]{% |
| 231 |
\font\xrm = #1 \beginchart\xrm \bigchart \endchart} |
| 232 |
|
| 233 |
% \smallfontchart{cmr10 at 10pt} |
| 234 |
% \bigfontchart{ecrm1000 at 10pt} |
| 235 |
\makeatother |
| 236 |
% End stolen from Dr Knuth |
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
\title{fontinst} |
| 241 |
\subtitle{Font installation software for \TeX} |
| 242 |
\author{Alan Jeffrey and Rowland McDonnell} |
| 243 |
\illustration{roadmap.eps} |
| 244 |
\version{1.8} |
| 245 |
\date{30 June 1998} |
| 246 |
|
| 247 |
\begin{document} |
| 248 |
|
| 249 |
\maketitle |
| 250 |
|
| 251 |
|
| 252 |
\begin{small} |
| 253 |
This is the tutorial part of the 1998 \fontinst manual, chiefly |
| 254 |
written by Rowland McDonnell and conveying his then-view on related |
| 255 |
subjects. Although most of it is still correct, |
| 256 |
the passing of time has rendered it somewhat antiquated, and the |
| 257 |
average current (2004) user new to \fontinst would probably find |
| 258 |
Philipp Lehman's \emph{The Font Installation Guide} |
| 259 |
(\url{http://www.ctan.org/tex-archive/info/Type1fonts/fontinstallationguide/}) |
| 260 |
more relevant. |
| 261 |
\end{small} |
| 262 |
|
| 263 |
\tableofcontents |
| 264 |
|
| 265 |
|
| 266 |
\clearpage |
| 267 |
|
| 268 |
\section{Introduction} |
| 269 |
|
| 270 |
The \fontinst package is a set of \TeX\ macros written to create |
| 271 |
virtual fonts for use with \TeX. Its main use is creating the |
| 272 |
files needed so you can use PostScript Type 1 fonts with \LaTeX. |
| 273 |
|
| 274 |
\Fontinst needs information about the fonts it works with. This |
| 275 |
information needs to be supplied in an Adobe Font Metric (\afm) or |
| 276 |
\TeX\ Property List (\pl) file. \pl files can be created from |
| 277 |
\tfm files using \tftopl, a program normally included with a \TeX\ |
| 278 |
system. |
| 279 |
|
| 280 |
The job that \fontinst does is complicated, but it can be used for |
| 281 |
many tasks by people who are not \TeX\ font wizards. Having said |
| 282 |
that, you do need to understand at least the basics of \LaTeXe's |
| 283 |
font selection mechanism, which is documented in |
| 284 |
\texttt{fntguide.tex}, part of the standard \LaTeX\ distribution. |
| 285 |
\url{ftp://ftp.tex.ac.uk/tex-archive/macros/latex/base/fntguide.tex} |
| 286 |
will fetch a copy if you don't have one to hand. |
| 287 |
|
| 288 |
To get the most benefit out of \fontinst, it's important to |
| 289 |
understand and use Karl Berry's `\Fontnamekb' naming scheme. The |
| 290 |
definitive version of this is available from your nearest CTAN |
| 291 |
server. The following URL will fetch all the files needed |
| 292 |
compressed into a single ZIP archive: |
| 293 |
\url{ftp://ftp.tex.ac.uk/tex-archive/info/fontname.zip}. I |
| 294 |
suggest that you print out the \Fontnamekb documentation and have |
| 295 |
it handy when you're learning about \fontinst. |
| 296 |
|
| 297 |
The \fontinst package: |
| 298 |
\begin{itemize} |
| 299 |
\item Is written in \TeX, for maximum portability (at the cost of |
| 300 |
speed). |
| 301 |
\item Supports the OT1 (Computer Modern) and T1 (Cork) encodings. |
| 302 |
\item Allows fonts to be generated with arbitrary `fake' |
| 303 |
characters; for example the `ij' character can be faked if |
| 304 |
necessary by putting an `i' next to a `j'. |
| 305 |
\item Allows caps and small caps fonts with letter spacing and |
| 306 |
kerning. |
| 307 |
\item Allows kerning to be shared between characters, for example |
| 308 |
`ij' can be kerned on the left as if it were an `i' and on the |
| 309 |
right as if it were a `j'. This is useful, since many |
| 310 |
PostScript fonts only include kerning information for characters |
| 311 |
without diacriticals. |
| 312 |
\item Allows the generation of math fonts with \verb|nextlarger|, |
| 313 |
\verb|varchar|, and arbitrary font dimensions. |
| 314 |
\item Allows more than one PostScript font to contribute to a |
| 315 |
\TeX\ font, for example the `ffi' ligatures for a font can be |
| 316 |
taken from the Expert encoding, if you have it. |
| 317 |
\item Can automatically generate a \fd file for use with \LaTeXe. |
| 318 |
\item Can be customized by the user to deal with arbitrary font |
| 319 |
encodings. |
| 320 |
\end{itemize} |
| 321 |
Fontinst has been a stable piece of software since mid-1994. All |
| 322 |
further updates will be upwardly compatible with the interface |
| 323 |
described in this document. |
| 324 |
|
| 325 |
\subsection{What does \fontinst do?} |
| 326 |
|
| 327 |
\Fontinst is a tool written in \TeX\ that can create the various |
| 328 |
extra files needed so you can use \PS fonts with \LaTeX\ and \TeX. |
| 329 |
It can read in \afm files, and produces the necessary \vpl, \pl, |
| 330 |
and \fd files to use the fonts (the human-readable \vpl and \pl |
| 331 |
files produced by \fontinst are turned into the machine-readable |
| 332 |
\vf and \tfm forms by \vptovf and \pltotf). It does not help you |
| 333 |
configure your DVI driver. |
| 334 |
|
| 335 |
There also exists a \texttt{perl} front-end to \fontinst, intended |
| 336 |
specifically for use with a Unix \TeX\ system, which takes care of |
| 337 |
routine tasks such as running \vptovf and \pltotf on the generated |
| 338 |
files after \fontinst has finished it's job. It also generates a |
| 339 |
font map file for use with \dvips. |
| 340 |
|
| 341 |
\Fontinst's main job is creating \vf files (virtual fonts). Not |
| 342 |
all \TeX\ systems can use them. As far as I know, all current |
| 343 |
(1998) free and shareware \TeX\ systems can; virtual fonts have |
| 344 |
been in widespread use with \TeX\ since 1990. If you have a TeX |
| 345 |
system that can't use virtual fonts, \fontinst is most likely |
| 346 |
useless to you. |
| 347 |
|
| 348 |
There are some nice things about having a tool written in \TeX\ to |
| 349 |
do this: it's completely portable and you can modify its behaviour |
| 350 |
using \TeX\ commands. The only real problem is that it's |
| 351 |
relatively slow: you can expect a typical \fontinst run to take |
| 352 |
something like 10--20 minutes on, say, a 40~MHz 80486SX PC or a |
| 353 |
25~MHz 68LC040 Macintosh. |
| 354 |
|
| 355 |
\Fontinst can do its work on any font for which you have a |
| 356 |
corresponding \afm or \tfm metric file, so it's not limited to |
| 357 |
working with \PS fonts; I have used it to produce the files I |
| 358 |
needed to use \TT fonts with \LaTeX. Whether or not you can do |
| 359 |
this depends on whether or not you have suitable metric files and |
| 360 |
whether or not your \TeX\ system can use \TT fonts. In |
| 361 |
particular, the pdf\TeX\ program supports \TT fonts and includes a |
| 362 |
utility \texttt{ttf2afm} to generate \afm files from \ttf fonts. |
| 363 |
|
| 364 |
Some people have used \fontinst to produce `special effects' with |
| 365 |
normal \TeX\ fonts. One example is the \setpackagename{eco} set |
| 366 |
of fonts (available from CTAN: |
| 367 |
\url{ftp://ftp.tex.ac.uk/tex-archive/fonts/eco/}). These fonts |
| 368 |
are the same as the standard EC (European Modern) fonts, but with |
| 369 |
normal numerals replaced with old style numerals -- |
| 370 |
\oldstylenums{12345} rather than 12345 -- everywhere except in |
| 371 |
maths mode. |
| 372 |
|
| 373 |
\subsection{Installation} |
| 374 |
|
| 375 |
To install \fontinst, put the contents of the \url{inputs/tex}, |
| 376 |
\url{inputs/etx}, \url{inputs/mtx} and \url{examples} directories |
| 377 |
into a directory read by \TeX, for example |
| 378 |
\url{TEXMF/tex/generic/fontinst}. |
| 379 |
|
| 380 |
When you use \fontinst, you need to make sure that the \afm and |
| 381 |
\pl files it will work on are in a directory searched by \TeX. |
| 382 |
|
| 383 |
If you are using \texttt{web2c} \TeX\ on a Unix system with the |
| 384 |
\TeX\ directory structure (TDS), you might put all the \afm files |
| 385 |
in subdirectories of \url{TEXMF/fonts/afm/*}. And then say: |
| 386 |
\begin{verbatim} |
| 387 |
setenv TEXINPUTS $TEXMF/fonts/afm//:: |
| 388 |
\end{verbatim}%$ |
| 389 |
Note that \pl files are not normally kept in \TeX\ installations, so |
| 390 |
if you want to use MF fonts with \fontinst you have to generate the |
| 391 |
corresponding \pl files from \tfm files and put them in your working |
| 392 |
directory before running \fontinst. |
| 393 |
|
| 394 |
You could adopt a similar strategy with other \TeX\ systems: |
| 395 |
create directories for the required files and then change the |
| 396 |
relevant parameter (\url{input_folders} in the default |
| 397 |
configuration file with \OzTeX, for example). |
| 398 |
|
| 399 |
The approach I use is this: I write a file containing commands for |
| 400 |
\fontinst to process, and put the \afm and \pl files needed in the |
| 401 |
same directory as that file. When \fontinst has finished working, |
| 402 |
I delete the \afm and \pl files because they are not needed and |
| 403 |
waste space on my hard disc drive. Some application programs on |
| 404 |
some computers need \afm files, so it's not always a good idea to |
| 405 |
remove them completely. |
| 406 |
|
| 407 |
\subsection{Why do we need \fontinst?} |
| 408 |
|
| 409 |
\TeX\ refers to characters by number when it's typesetting. When |
| 410 |
you use a command like \verb|\i|, \TeX\ puts a number (16 if |
| 411 |
you're using OT1, 25 if you're using T1) into the \dvi file. If |
| 412 |
you're using a font designed for use with \TeX, this number will |
| 413 |
correspond to the character `\i'. Assuming OT1 encoding for the |
| 414 |
moment, when you come to print out your \dvi file, the DVI driver |
| 415 |
will see the number 16 in the \dvi file, and select the character |
| 416 |
that sits in position 16 of the corresponding printer font file (a |
| 417 |
\pk file in the case of normal \TeX\ fonts). Unless something has |
| 418 |
gone wrong, that will result in the character `\i' being placed on |
| 419 |
the page. |
| 420 |
|
| 421 |
It's useful to think of these numbers and the actual characters |
| 422 |
corresponding to each number as sets called `encodings'. A |
| 423 |
particular set of characters are assigned particular numbers. An |
| 424 |
example of an encoding is shown in table~\ref{OT1table}. |
| 425 |
|
| 426 |
\TeX\ began life using 7-bit fonts. This means the original \TeX\ |
| 427 |
fonts used the numbers 0--127 to represent characters: |
| 428 |
128~characters per font. \TeX\ can now use 8-bit fonts: |
| 429 |
256~numbers from 0--255, but even so, most typesetting with \TeX\ |
| 430 |
still uses the original 7-bit encoding, now called `OT1' (Old |
| 431 |
\TeX~1 encoding). This has a correspondance between numbers and |
| 432 |
characters shown in table~\ref{OT1table}. The numbers used in |
| 433 |
that table are hexadecimal and octal because it makes for a neat |
| 434 |
table and anyway I stole the code to generate it from Donald Knuth |
| 435 |
and that's how he did it. |
| 436 |
|
| 437 |
\begin{table}[!t] |
| 438 |
\smallfontchart{cmr10 at 10pt} |
| 439 |
\caption{The OT1 font encoding}\label{OT1table} |
| 440 |
\end{table} |
| 441 |
|
| 442 |
Returning to the example above, if you've a number 16 in your \dvi |
| 443 |
file (expecting `\i', a dotless~i), but rather than printing |
| 444 |
with an OT1 encoded font, you print using a non re-encoded \PS |
| 445 |
font in Adobe standard encoding, you'll get a blank, because the |
| 446 |
Adobe standard encoding has nothing in that character position. |
| 447 |
|
| 448 |
There are several ways round this problem; I'll consider two cases |
| 449 |
here. If you are using \LaTeX\ you can tell it about a new |
| 450 |
encoding and re-define the commands that produce characters like |
| 451 |
`\i' that live in different positions in different encodings, or |
| 452 |
you can use a tool to re-encode the font so that it has the |
| 453 |
expected characters in the appropriate positions. |
| 454 |
|
| 455 |
Re-encoding is the approach \fontinst uses: it can produce files |
| 456 |
to map the characters in the new font to one of \TeX's existing |
| 457 |
encodings; this works with formats other than \LaTeX. |
| 458 |
|
| 459 |
The first approach is used to define the standard encodings that |
| 460 |
\LaTeX\ uses. See, for example, the file \texttt{ot1enc.def} that |
| 461 |
comes with the current \LaTeX\ distribution, which defines the a |
| 462 |
few commands that refer to characters which aren't in the |
| 463 |
positions \TeX\ would otherwise assume. This works only with |
| 464 |
modern versions of \LaTeX. |
| 465 |
|
| 466 |
The second approach is used to allow you to use fonts in other |
| 467 |
encodings with any dialect of \TeX. It has the some advantages |
| 468 |
over the first method: it works with any \TeX\ format; and it |
| 469 |
improves portability, because you can typeset a document using a |
| 470 |
standard \TeX\ encoding, sure that the same document will print |
| 471 |
correctly on a different kind of computer using a font with a |
| 472 |
different encoding. For example, you might say: |
| 473 |
\begin{verbatim} |
| 474 |
\usepackage{times} |
| 475 |
\end{verbatim} |
| 476 |
in the preamble of your document. On my computer, that means my |
| 477 |
DVI driver will use a Macintosh encoded \TT version of Times. On |
| 478 |
your computer, it might mean the dvi driver will use a Unicode |
| 479 |
encoded \PS version of Times-Roman. The results will be identical |
| 480 |
in either case, without needing to modify the document. |
| 481 |
|
| 482 |
\subsection{How do you use \fontinst?} |
| 483 |
|
| 484 |
\Fontinst works on \afm files named (more-or-less) according to |
| 485 |
Karl Berry's font naming scheme (see |
| 486 |
\url{ftp://ftp.tex.ac.uk/tex-archive/info/fontname} at CTAN). |
| 487 |
Let's say you want to use the Adobe Times fonts. You can get the |
| 488 |
metric files for this font from CTAN: |
| 489 |
\begin{center} |
| 490 |
\begin{small} |
| 491 |
\begin{tabular}{ll} |
| 492 |
\emph{Location of file at CTAN} & \emph{Rename to} \\ |
| 493 |
\url{fonts/psfonts/adobeafm/base35/tib_____.afm} & |
| 494 |
\texttt{ptmb8a.afm} \\ |
| 495 |
\url{fonts/psfonts/adobeafm/base35/tibi____.afm} & |
| 496 |
\texttt{ptmbi8a.afm} \\ |
| 497 |
\url{fonts/psfonts/adobeafm/base35/tii_____.afm} & |
| 498 |
\texttt{ptmri8a.afm} \\ |
| 499 |
\url{fonts/psfonts/adobeafm/base35/tir_____.afm} & |
| 500 |
\texttt{ptmr8a.afm} |
| 501 |
\end{tabular} |
| 502 |
\end{small} |
| 503 |
\end{center} |
| 504 |
The new name is the name you should give the \tfm files so that |
| 505 |
\fontinst understands what each file contains. The initial `|p|' |
| 506 |
means `Adobe'; `|tm|' means `Times'; `|b|' bold, `|r|' roman, |
| 507 |
`|i|' italic; and `|8a|' means `Adobe standard encoding'. |
| 508 |
|
| 509 |
The simplest use of \fontinst is to put the four \afm files in the |
| 510 |
same directory as \texttt{fontinst.sty} and run \TeX\ on |
| 511 |
\texttt{fontinst.sty}. At the \verb|*| prompt type: |
| 512 |
\begin{verbatim} |
| 513 |
*\latinfamily{ptm}{} \bye |
| 514 |
\end{verbatim} |
| 515 |
|
| 516 |
Some time later (about 17 minutes on my rather old computer), |
| 517 |
\fontinst will have finished, having created: |
| 518 |
\begin{itemize} |
| 519 |
\item Two \pl files for each \afm file |
| 520 |
\item One \vpl file for each \TeX\ font |
| 521 |
\item One \fd file for each family |
| 522 |
\end{itemize} |
| 523 |
The \pl files come in pairs: for example, \texttt{ptmb8a.pl} and |
| 524 |
\texttt{ptmb8r.pl}. The |8a| version has the same encoding as the |
| 525 |
original font; the |8r| version is re-encoded to |TeXBase1| (|8r|) |
| 526 |
encoding, and is the font that is the base on which the T1 and OT1 |
| 527 |
encoded versions are based on. The raw |8a| (Adobe standard) |
| 528 |
encoded font is not normally used. |
| 529 |
|
| 530 |
These can be converted to \TeX\ fonts using \pltotf or \vptovf. |
| 531 |
If you have \OzTeX, launch \OzMF, select \pltotf (or \vptovf) from |
| 532 |
the Tools menu, and say `Do all files'. |
| 533 |
|
| 534 |
If you use the \texttt{bash} shell on a Unix system, you can |
| 535 |
process all files using these one-liners at the \verb|$| prompt: |
| 536 |
\begin{verbatim} |
| 537 |
$ for f in in *.pl; do pltotf $f; done |
| 538 |
$ for f in in *.vpl; do vptovf $f; done |
| 539 |
\end{verbatim}%$ |
| 540 |
(This assumes that \pltotf and \vptovf can deduce the file names |
| 541 |
of the corresponding \tfm and \vf files automatically.) |
| 542 |
|
| 543 |
You should then: |
| 544 |
\begin{itemize} |
| 545 |
\item Move the \tfm files to your \TeX\ fonts directory\\ |
| 546 |
(e.g.~\url{TEXMFLOCAL/fonts/tfm/*}). |
| 547 |
\item Move the \vf files to your virtual fonts directory\\ |
| 548 |
(e.g.~\url{TEXMFLOCAL/fonts/vf/*}). |
| 549 |
\item Move the \fd files to your \TeX\ inputs directory\\ |
| 550 |
(e.g.~\url{TEXMFLOCAL/tex/latex/psfonts/*}). |
| 551 |
\end{itemize} |
| 552 |
If your \TeX\ installation is organized using the \TeX\ directory |
| 553 |
structure (TDS), it is customary to subdivide the \tfm and \vf |
| 554 |
files into subdirectories by supplier and typeface name. |
| 555 |
|
| 556 |
The \pl, \vpl, and \mtx files are debris that can now be deleted. |
| 557 |
\mtx files are font metric files \fontinst creates for its own use |
| 558 |
from \afm and \pl files. They're just more convenient for \TeX\ |
| 559 |
to read than other forms -- think of them as \fontinst readable |
| 560 |
\afm and \pl files. |
| 561 |
|
| 562 |
By now, you have all the files in place to produce a \dvi file |
| 563 |
using the new fonts. You can make Adobe Times the default roman |
| 564 |
font in your document by putting this in your preamble: |
| 565 |
\begin{verbatim} |
| 566 |
\renewcommand{\rmdefault}{ptm} |
| 567 |
\end{verbatim} |
| 568 |
|
| 569 |
\TeX\ will now happily produce a perfectly good \dvi file |
| 570 |
including the new font, which your DVI driver will choke on |
| 571 |
because you've not yet told it about the new fonts. Exactly how |
| 572 |
you do this depends on the dvi driver, but they all need the same |
| 573 |
information: the name of a \TeX\ font; the printer font name it |
| 574 |
corresponds to; some information to handle an re-encoding needed; |
| 575 |
and (in the case of a \PS driver) perhaps an instruction to |
| 576 |
download the font to the printer. You don't need to download the |
| 577 |
Times font to a \PS printer, because Times is built in to every |
| 578 |
\PS printer. |
| 579 |
|
| 580 |
If you use \dvips, these lines added to your \texttt{psfonts.map} |
| 581 |
file will do the job: |
| 582 |
\begin{verbatim} |
| 583 |
ptmr8r Times-Roman "TeXBase1Encoding ReEncodeFont" <<8r.enc |
| 584 |
ptmri8r Times-Italic "TeXBase1Encoding ReEncodeFont" <<8r.enc |
| 585 |
ptmb8r Times-Bold "TeXBase1Encoding ReEncodeFont" <<8r.enc |
| 586 |
ptmbi8r Times-BoldItalic "TeXBase1Encoding ReEncodeFont" <<8r.enc |
| 587 |
ptmro8r Times-Roman "0.167 SlantFont TeXBase1Encoding ReEncodeFont" <<8r.enc |
| 588 |
ptmbo8r Times-Bold "0.167 SlantFont TeXBase1Encoding ReEncodeFont" <<8r.enc |
| 589 |
\end{verbatim} |
| 590 |
And now you can print a \dvi file containing the new fonts. If |
| 591 |
you really do want to use the `raw' |8a| encoded fonts for some |
| 592 |
reason, you need to add these lines to your \texttt{psfonts.map} |
| 593 |
file: |
| 594 |
\begin{verbatim} |
| 595 |
ptmr8a Times-Roman |
| 596 |
ptmri8a Times-Italic |
| 597 |
ptmb8a Times-Bold |
| 598 |
ptmbi8a Times-BoldItalic |
| 599 |
ptmro8a Times-Roman "0.167 SlantFont" |
| 600 |
ptmbo8a Times-Bold "0.167 SlantFont" |
| 601 |
\end{verbatim} |
| 602 |
|
| 603 |
Assuming that you're using the \fd file that \fontinst has |
| 604 |
produced, and that you've asked for the Adobe Times family (|ptm|) |
| 605 |
in medium series (|m|) and upright shape (|n| for normal) using |
| 606 |
the NFSS font selection commands: |
| 607 |
\begin{verbatim} |
| 608 |
\renewcommand{\rmdefault}{ptm} |
| 609 |
\rmfamily \mdseries \upshape |
| 610 |
\end{verbatim} |
| 611 |
Assuming further that you are using the \fd file \texttt{t1ptm.fd} |
| 612 |
produced by \fontinst, the \TeX\ font (\tfm file) \texttt{ptmr8t.tfm} |
| 613 |
will be selected by the above commands, as you can see from the |
| 614 |
relevant line in \texttt{t1ptm.fd}: |
| 615 |
\begin{verbatim} |
| 616 |
\DeclareFontShape{T1}{ptm}{m}{n}{<<->> ptmr8t}{} |
| 617 |
\end{verbatim} |
| 618 |
|
| 619 |
This is what happens: |
| 620 |
\begin{itemize} |
| 621 |
\item \TeX\ typesets your document using the font metric file |
| 622 |
\texttt{ptmr8t.tfm}; this is the font that is put in the \dvi |
| 623 |
file. |
| 624 |
\item \Dvips looks at the \dvi file, and sees a reference to the |
| 625 |
font \texttt{ptmr8t}. |
| 626 |
\item \Dvips searches for a \vf file corresponding to |
| 627 |
\texttt{ptmr8t}; when it finds \texttt{ptmr8t.vf}, it knows it |
| 628 |
has a virtual font on its hands. |
| 629 |
%\footnote{This is a slight lie--why?} |
| 630 |
\item \Dvips follows the instructions in the \vf file, which map |
| 631 |
characters in \texttt{ptmr8t.tfm} to characters in the font |
| 632 |
\texttt{ptmr8r.tfm}. That is, when it sees a number~25 in the |
| 633 |
\dvi file (dotless~i -- `\i' -- in T1 encoding), it replaces it |
| 634 |
with a number~17, which is a dotless~i in |8r| encoding. |
| 635 |
\item Then \dvips looks up the name of each number according to |
| 636 |
the scheme given in the file \texttt{8r.enc}, and replaces each |
| 637 |
number with the name of the character, in this case, number~17 |
| 638 |
is listed as `dotlessi'. |
| 639 |
\item And finally, \dvips tells the printer to print the named |
| 640 |
character. |
| 641 |
\end{itemize} |
| 642 |
|
| 643 |
Not all DVI drivers can manage re-encoding as well as \dvips can. |
| 644 |
For example, \OzTeX's built-in non-\PS \dvi driver can only work |
| 645 |
with numbers, so if I'm using a \PS font, I can't print characters |
| 646 |
(such as Eth) that don't have a number in Macintosh text encoding |
| 647 |
unless I use \dvips and print on a \PS printer. \Dvips works with |
| 648 |
character names, so it's not subject to this restriction. In the |
| 649 |
example above, \OzTeX\ would replace the number~17 for `dotlessi' |
| 650 |
in |8r| encoding with a number~245 for `dotlessi' in Macintosh |
| 651 |
text encoding. |
| 652 |
|
| 653 |
The details of the \LaTeXe{} font selection scheme are described |
| 654 |
in \emph{\LaTeXe{} font selection} (distributed with \LaTeXe\ as |
| 655 |
the file \texttt{fntguide.tex}) and \emph{The \LaTeX\ Companion} |
| 656 |
(Goossens, Mittelbach and Samarin, Addison-Wesley). |
| 657 |
%You might also find useful the file \url{info/simple-nfss.tex} |
| 658 |
%available at your nearest comprehensive \TeX\ archive network |
| 659 |
%(CTAN) FTP server. |
| 660 |
|
| 661 |
The files you need to use Times, Helvetica, Courier, and the rest |
| 662 |
of the `standard' \PS fonts are distributed as part of the |
| 663 |
\setpackagename{PSNFSS} bundle available from CTAN, so there's no |
| 664 |
need to create new files to use these fonts. |
| 665 |
|
| 666 |
A more involved example of \fontinst use can be seen in the file |
| 667 |
\texttt{fontptcm.tex} which creates the files you need to use a |
| 668 |
combination of Times, Symbol, Zapf Chancery and Computer Modern as |
| 669 |
\TeX\ math fonts. |
| 670 |
|
| 671 |
|
| 672 |
\section{Installing your own font family} |
| 673 |
|
| 674 |
The \fontinst package has a command \verb|\latinfamily| meant to |
| 675 |
do most of the work to install a `normal' set (family) of roman |
| 676 |
text fonts from Adobe. Assuming you have a set of \afm files to |
| 677 |
match the fonts you wish to use, the first step is to rename the |
| 678 |
\afm files according to the \Fontnamekb naming scheme. |
| 679 |
|
| 680 |
A `normal' set of text fonts usually includes the basic upright |
| 681 |
roman version, bold, italic, and bold italic. Sometimes there |
| 682 |
will also be small caps versions, perhaps some `expert' fonts, and |
| 683 |
maybe some other weights such as light, medium, semi bold, black |
| 684 |
or ultra bold. |
| 685 |
|
| 686 |
The most important point to note is this: no matter what sort of |
| 687 |
computer you're using and no matter what font encoding it uses |
| 688 |
normally, \afm files for text fonts are almost always in |8a| |
| 689 |
encoding (Adobe standard encoding), so the \afm files when renamed |
| 690 |
normally end in |8a|. |
| 691 |
|
| 692 |
A typical set of four \afm files re-named for use with \fontinst |
| 693 |
is this: |
| 694 |
\begin{verbatim} |
| 695 |
ptmr8r.afm Times-Roman |
| 696 |
ptmri8r.afm Times-Italic |
| 697 |
ptmb8r.afm Times-Bold |
| 698 |
ptmbi8r.afm Times-BoldItalic |
| 699 |
\end{verbatim} |
| 700 |
Not all \afm files use |8a| encoding. If you open an \afm file |
| 701 |
using a text editor, you'll see a line looking like this somewhere |
| 702 |
near the top: |
| 703 |
\begin{verbatim} |
| 704 |
EncodingScheme AdobeStandardEncoding |
| 705 |
\end{verbatim} |
| 706 |
and if you see exactly that, the \afm file should end with |8a|. |
| 707 |
If you see something like this: |
| 708 |
\begin{verbatim} |
| 709 |
EncodingScheme FontSpecific |
| 710 |
\end{verbatim} |
| 711 |
have a look at the name of the font in the \afm file. If you see |
| 712 |
something like this: |
| 713 |
\begin{verbatim} |
| 714 |
FontName AGaramondExp-Regular |
| 715 |
FullName Adobe Garamond Regular Expert |
| 716 |
\end{verbatim} |
| 717 |
you have an `expert' encoded font on your hands, and the \afm file |
| 718 |
should end with |8x| to indicate this to \fontinst. An |8x| |
| 719 |
encoded font contains extra glyphs like old style numerals, small |
| 720 |
capital letters, more ligatures, and so on. |
| 721 |
|
| 722 |
%% UV: taken out -- repeated below |
| 723 |
%% |
| 724 |
%If you have an expert font, you can tell \fontinst to use it when |
| 725 |
%it's processing a \verb|\latinfamily| command by putting an `|x|' |
| 726 |
%on the end of the family name: |
| 727 |
%\begin{verbatim} |
| 728 |
% \latinfamily{padx}{} |
| 729 |
%\end{verbatim} |
| 730 |
%If you want to tell \fontinst to use expert fonts to install fonts |
| 731 |
%with old style numerals, you can do so by putting an `|j|' on the |
| 732 |
%end of the family name: |
| 733 |
%\begin{verbatim} |
| 734 |
% \latinfamily{padj}{} |
| 735 |
%\end{verbatim} |
| 736 |
|
| 737 |
The |\latinfamily| command is used like this: |
| 738 |
\begin{decl} |
| 739 |
|\latinfamily|\arg{family}\arg{commands} |
| 740 |
\end{decl} |
| 741 |
This installs a Latin family of fonts. |
| 742 |
|
| 743 |
For example, to install Adobe Times, you say: |
| 744 |
\begin{verbatim} |
| 745 |
\latinfamily{ptm}{} |
| 746 |
\end{verbatim} |
| 747 |
The \textit{commands} issued by \LaTeX\ each time a font from that |
| 748 |
family is loaded. This is most often used with typewriter fonts, |
| 749 |
to switch off hyphenation. For example, Adobe Courier can be |
| 750 |
installed with: |
| 751 |
\begin{verbatim} |
| 752 |
\latinfamily{pcr}{\hyphenchar\font=-1} |
| 753 |
\end{verbatim} |
| 754 |
Once the installation is over (which may take some time) the fonts |
| 755 |
can be used in \LaTeX\ by selecting an appropriate |
| 756 |
\verb|\fontfamily|, for example Adobe Times can be selected with: |
| 757 |
\begin{verbatim} |
| 758 |
\fontfamily{ptm}\selectfont |
| 759 |
\end{verbatim} |
| 760 |
If the fourth letter of the family name is `|x|' then \fontinst |
| 761 |
will use expert fonts in creating the fonts. If the fourth letter |
| 762 |
is `|j|' (or for backward compatibility `|9|') then \fontinst will |
| 763 |
use expert fonts to create fonts with old style digits. |
| 764 |
|
| 765 |
For example, to install Adobe Garamond using expert fonts, you say: |
| 766 |
\begin{verbatim} |
| 767 |
\latinfamily{padx}{} |
| 768 |
\end{verbatim} |
| 769 |
To install Adobe Garamond using expert fonts with oldstyle digits, |
| 770 |
you say: |
| 771 |
\begin{verbatim} |
| 772 |
\latinfamily{padj}{} |
| 773 |
\end{verbatim} |
| 774 |
|
| 775 |
When you have expert fonts, and you've told \fontinst to use |
| 776 |
them, it will carry on as normal, but the resulting font family |
| 777 |
will have the name `|padx|' or `|padj|', and it will use expert |
| 778 |
glyphs whenever possible, so you'll have a real (rather than |
| 779 |
faked) small caps font, real (rather than faked) `ffl' ligatures, |
| 780 |
and so on. |
| 781 |
|
| 782 |
Before using these commands, you will need to make sure that you |
| 783 |
have the Adobe Font Metric (\afm) files for the fonts, and that |
| 784 |
they have appropriate names. The \fontinst package uses the |
| 785 |
\LaTeX\ convention for naming fonts, and uses a \emph{font family} |
| 786 |
name which consists of: |
| 787 |
\begin{itemize} |
| 788 |
\item a \emph{supplier} (or foundry), such as `|p|' for Adobe. |
| 789 |
\item a \emph{typeface}, such as `|ad|' for Adobe Garamond. |
| 790 |
\item up to two \emph{variants}, such as `|j|' or `|x|' for `old |
| 791 |
style digits' or `expert'. |
| 792 |
\end{itemize} |
| 793 |
So the family name `|padj|' indicates Adobe Garamond with old |
| 794 |
style digits. Note that the variants `|j|' or `|x|' are |
| 795 |
interpreted by \fontinst itself and do not appear in external font |
| 796 |
names, whereas other variants are passed through as part of the |
| 797 |
font names. (This is needed for families which have a sans serif |
| 798 |
or typewriter variant.) |
| 799 |
|
| 800 |
The \emph{supplier} must be one letter, and the \emph{typeface} |
| 801 |
must be two (this is an attempt to fit all filenames into MS-DOS |
| 802 |
format). Each variant is one letter. The full list of foundries, |
| 803 |
typefaces, shapes and variants is given in Karl Berry's |
| 804 |
`\emph{Filenames for fonts}' (available by anonymous FTP from |
| 805 |
\url{ftp://ftp.tex.ac.uk/tex-archive/info/fontname}), but the more |
| 806 |
common ones are given in |
| 807 |
Tables~\ref{Tab:foundry}--\ref{Tab:typeface}. |
| 808 |
|
| 809 |
\begin{table}[!t] |
| 810 |
\begin{minipage}{0.5\textwidth} |
| 811 |
\small |
| 812 |
\begin{tabular}{ll} |
| 813 |
|b| & Bitstream \\ |
| 814 |
|f| & `free' (public domain) \\ |
| 815 |
|h| & Bigelow \& Holmes \\ |
| 816 |
|i| & ITC \\ |
| 817 |
|l| & Linotype \\ |
| 818 |
|m| & Monotype \\ |
| 819 |
|p| & Adobe (|p| for \PS) \\ |
| 820 |
|r| & `raw' (obsolete) \\ |
| 821 |
|u| & URW \\ |
| 822 |
|z| & bizarre |
| 823 |
\end{tabular} |
| 824 |
\caption{A partial list of foundries} |
| 825 |
\label{Tab:foundry} |
| 826 |
\begin{tabular}{ll} |
| 827 |
|a| & alternate \\ |
| 828 |
|d| & display, titling \\ |
| 829 |
|f| & fraktur, handtooled \\ |
| 830 |
|j| & oldstyle digits \\ |
| 831 |
|n| & informal, casual \\ |
| 832 |
|p| & ornaments \\ |
| 833 |
|s| & sans serif \\ |
| 834 |
|t| & typewriter \\ |
| 835 |
|w| & script, handwriting, swash \\ |
| 836 |
|x| & expert \\ |
| 837 |
\end{tabular} |
| 838 |
\caption{A partial list of variants} |
| 839 |
\label{Tab:variant} |
| 840 |
\begin{tabular}{ll} |
| 841 |
|c| & small caps \\ |
| 842 |
|i| & italic \\ |
| 843 |
|o| & oblique (i.e.,~slanted) \\ |
| 844 |
|u| & unslanted italic \\ |
| 845 |
\end{tabular} |
| 846 |
\caption{A partial list of shapes} |
| 847 |
\label{Tab:shape} |
| 848 |
\end{minipage} |
| 849 |
\begin{minipage}{0.5\textwidth} |
| 850 |
\small |
| 851 |
\begin{tabular}{ll} |
| 852 |
|ac| & Adobe Caslon \\ |
| 853 |
|ad| & Adobe Garamond \\ |
| 854 |
|ag| & Avantgarde \\ |
| 855 |
|bb| & Bembo \\ |
| 856 |
|bd| & Bodoni \\ |
| 857 |
|bk| & Bookman \\ |
| 858 |
|bv| & Baskerville \\ |
| 859 |
|ca| & Caslon \\ |
| 860 |
|ch| & Charter \\ |
| 861 |
|cr| & Courier \\ |
| 862 |
|fr| & Frutiger \\ |
| 863 |
|fu| & Futura \\ |
| 864 |
|gl| & Galliard \\ |
| 865 |
|gm| & Garamond \\ |
| 866 |
|gs| & Gill Sans \\ |
| 867 |
|hv| & Helvetica \\ |
| 868 |
|mn| & Minion \\ |
| 869 |
|lc| & Lucida \\ |
| 870 |
|lh| & Lucida Bright \\ |
| 871 |
|ls| & Lucida Sans \\ |
| 872 |
|nb| & New Baskerville \\ |
| 873 |
|nc| & New Century Schoolbook \\ |
| 874 |
|op| & Optima \\ |
| 875 |
|pl| & Palatino \\ |
| 876 |
|sy| & Symbol \\ |
| 877 |
|tm| & Times \\ |
| 878 |
|ut| & Utopia \\ |
| 879 |
|zc| & Zapf Chancery \\ |
| 880 |
|zd| & Zapf Dingbats \\ |
| 881 |
\end{tabular} |
| 882 |
\caption{A partial list of faces} |
| 883 |
\label{Tab:typeface} |
| 884 |
\end{minipage} |
| 885 |
\end{table} |
| 886 |
|
| 887 |
The \fontinst package uses Karl Berry's naming scheme for \afm |
| 888 |
files. The full naming scheme is rather more flexible than the |
| 889 |
subset used by \fontinst, which uses filenames consisting of: |
| 890 |
\begin{itemize} |
| 891 |
\item a \emph{supplier}, such as `|p|' for Adobe. |
| 892 |
\item a \emph{typeface}, such as `|hv|' for Helvetica. |
| 893 |
\item a \emph{weight}, such as `|r|' for regular. |
| 894 |
\item up to two \emph{shapes} or \emph{variants}, such as `|o|' |
| 895 |
for oblique. |
| 896 |
\item an \emph{encoding}, such as `|7t|' for Knuth's 7-bit \TeX{} |
| 897 |
encoding. |
| 898 |
\item an optional \emph{width}, such as `|n|' for narrow. |
| 899 |
\item a \emph{file extension}, such as `\texttt{.tfm}' |
| 900 |
for \TeX{} Font Metric. |
| 901 |
\end{itemize} |
| 902 |
So the filename name `\texttt{phvro7tn.tfm}' indicates Adobe |
| 903 |
Helvetica regular oblique narrow, in the 7-bit \TeX{} encoding. |
| 904 |
|
| 905 |
The full list of shapes, encodings and weights is given in Karl |
| 906 |
Berry's `\emph{Filenames for fonts}', but the more common ones are |
| 907 |
given in Tables~\ref{Tab:shape}--\ref{Tab:weight}. |
| 908 |
|
| 909 |
\begin{table} |
| 910 |
\begin{minipage}{0.5\textwidth} |
| 911 |
\small |
| 912 |
\begin{tabular}{ll} |
| 913 |
|b| & bold \\ |
| 914 |
|c| & black \\ |
| 915 |
|d| & demibold \\ |
| 916 |
|h| & heavy \\ |
| 917 |
|k| & book \\ |
| 918 |
|l| & light \\ |
| 919 |
|m| & medium \\ |
| 920 |
|r| & regular \\ |
| 921 |
|s| & semibold \\ |
| 922 |
|u| & ultra bold \\ |
| 923 |
|x| & extra bold \\ |
| 924 |
\end{tabular} |
| 925 |
\caption{A partial list of weights} |
| 926 |
\label{Tab:weight} |
| 927 |
\begin{tabular}{ll} |
| 928 |
|c| & condensed \\ |
| 929 |
|n| & narrow \\ |
| 930 |
|w| & wide \\ |
| 931 |
|x| & extended \\ |
| 932 |
\end{tabular} |
| 933 |
\caption{A partial list of widths} |
| 934 |
\label{Tab:width} |
| 935 |
\end{minipage} |
| 936 |
\begin{minipage}{0.5\textwidth} |
| 937 |
\small |
| 938 |
\begin{tabular}{ll} |
| 939 |
|8a| & Adobe Standard \\ |
| 940 |
|8x| & Adobe Expert \\ |
| 941 |
|8r| & \TeX{} 8-bit `raw' (\texttt{TeXBase1}) \\ |
| 942 |
|8y| & \TeX{} 8-bit `raw' (\texttt{TeXnANSI}) \\ |
| 943 |
|7t| & \TeX{} 7-bit text (\texttt{OT1}) \\ |
| 944 |
|7m| & \TeX{} 7-bit math italic (\texttt{OML}) \\ |
| 945 |
|7y| & \TeX{} 7-bit math symbol (\texttt{OMS}) \\ |
| 946 |
|7v| & \TeX{} 7-bit math extension (\texttt{OMX}) \\ |
| 947 |
|8t| & \TeX{} 8-bit text (\texttt{T1}) \\ |
| 948 |
|8c| & \TeX{} 8-bit text symbols (\texttt{TS1}) \\ |
| 949 |
|9t| & \TeX{} 7-bit text with expert glyphs \\ |
| 950 |
|9o| & \TeX{} 7-bit text with expert glyphs \\ |
| 951 |
& and old-style digits \\ |
| 952 |
|9e| & \TeX{} 8-bit text with expert glyphs \\ |
| 953 |
|9d| & \TeX{} 8-bit text with expert glyphs \\ |
| 954 |
& and old-style digits \\ |
| 955 |
|9c| & \TeX{} 8-bit symbols with expert glyphs \\ |
| 956 |
& and old-style digits \\ |
| 957 |
\end{tabular} |
| 958 |
\caption{A partial list of encodings} |
| 959 |
\end{minipage} |
| 960 |
\end{table} |
| 961 |
|
| 962 |
For example, to install Adobe Garamond including the expert fonts, you |
| 963 |
would need to rename the \afm files: |
| 964 |
\begin{center} |
| 965 |
\begin{small} |
| 966 |
\begin{tabular}{lll} |
| 967 |
\emph{Adobe name} & \emph{ATM name} & \emph{Fontinst name} \\ |
| 968 |
|AGaramond-Bold.afm| & |gdb_____.afm| & |padb8a.afm| \\ |
| 969 |
|AGaramond-BoldItalic.afm| & |gdbi____.afm| & |padbi8a.afm| \\ |
| 970 |
|AGaramond-Italic.afm| & |gdi_____.afm| & |padri8a.afm| \\ |
| 971 |
|AGaramond-Regular.afm| & |gdrg____.afm| & |padr8a.afm| \\ |
| 972 |
|AGaramond-Semibold.afm| & |gdsb____.afm| & |pads8a.afm| \\ |
| 973 |
|AGaramond-SemiboldItalic.afm| & |gdsbi___.afm| & |padsi8a.afm| \\ |
| 974 |
|AGaramondExp-Bold.afm| & |geb_____.afm| & |padb8x.afm| \\ |
| 975 |
|AGaramondExp-BoldItalic.afm| & |gebi____.afm| & |padbi8x.afm| \\ |
| 976 |
|AGaramondExp-Italic.afm| & |gei_____.afm| & |padri8x.afm| \\ |
| 977 |
|AGaramondExp-Regular.afm| & |gerg____.afm| & |padr8x.afm| \\ |
| 978 |
|AGaramondExp-Semibold.afm| & |gesb____.afm| & |pads8x.afm| \\ |
| 979 |
|AGaramondExp-SemiboldItalic.afm| & |gesbi___.afm| & |padsi8x.afm| \\ |
| 980 |
|AGaramond-RegularSC.afm| & |gdsc____.afm| & |padrc8a.afm| \\ |
| 981 |
|AGaramond-SemiboldSC.afm| & |gdsbs___.afm| & |padsc8a.afm| \\ |
| 982 |
\end{tabular} |
| 983 |
\end{small} |
| 984 |
\end{center} |
| 985 |
You can then run \TeX{} on the following document to install the |
| 986 |
Adobe Garamond family: |
| 987 |
\begin{verbatim} |
| 988 |
\input fontinst.sty |
| 989 |
\latinfamily{padx}{} |
| 990 |
\latinfamily{padj}{} |
| 991 |
\bye |
| 992 |
\end{verbatim} |
| 993 |
Not all font families can be installed using the \verb|\latinfamily| |
| 994 |
command, nor does it always produce optimal results. The main |
| 995 |
interfaces to \fontinst are at a slightly lower level, where all font |
| 996 |
names appear explicitly in command arguments, and at that level it is |
| 997 |
possible to fine tune the font generation. The \verb|\latinfamily| |
| 998 |
command is mainly a clever collection of macros which expand to a |
| 999 |
mostly fixed\footnote{Commands that would refer to files which are |
| 1000 |
not present are skipped, and in some cases there is a ``Plan B'' |
| 1001 |
when ``Plan A'' would have made use of such a nonexistent file, but |
| 1002 |
that is about it.} sequence of lower level \fontinst commands. |
| 1003 |
|
| 1004 |
\begin{bfseries} |
| 1005 |
Descriptions of the sub-\verb|\latinfamily| commands can be found |
| 1006 |
in the main \fontinst manual. |
| 1007 |
\end{bfseries} |
| 1008 |
|
| 1009 |
|
| 1010 |
|
| 1011 |
\section{More on the \cs{latinfamily} command} |
| 1012 |
|
| 1013 |
The \verb|\latinfamily| command is essentially a short-cut to save you |
| 1014 |
preparing a huge file with many different \fontinst commands in it. |
| 1015 |
|
| 1016 |
It takes \afm or \mtx files as the source of font metric data to work |
| 1017 |
with. Usually, you have a set of \afm files. They must be named |
| 1018 |
according to a subset of the \Fontnamekb naming scheme. To illustrate |
| 1019 |
the process, here is an edited part of the console log from a use of |
| 1020 |
\verb|\latinfamily|: |
| 1021 |
\begin{verbatim} |
| 1022 |
\latinfamily{pad}{} |
| 1023 |
\end{verbatim} |
| 1024 |
This log does not show \fontinst `in action'; it's just to illustrate |
| 1025 |
which fonts are looked for when you use the \verb|\latinfamily| |
| 1026 |
command. |
| 1027 |
\begin{verbatim} |
| 1028 |
INFO>> to make LaTeX font shape <<pad,m,n,>> seek padr8r.mtx |
| 1029 |
INFO>> to make LaTeX font shape <<pad,m,sc,>> seek padrc8r.mtx |
| 1030 |
INFO>> to make LaTeX font shape <<pad,m,sl,>> seek padro8r.mtx |
| 1031 |
INFO>> to make LaTeX font shape <<pad,m,it,>> seek padri8r.mtx |
| 1032 |
INFO>> to make LaTeX font shape <<pad,m,n,c>> seek padr8rn.mtx |
| 1033 |
INFO>> to make LaTeX font shape <<pad,m,sc,c>> seek padrc8rn.mtx |
| 1034 |
INFO>> to make LaTeX font shape <<pad,m,sl,c>> seek padro8rn.mtx |
| 1035 |
INFO>> to make LaTeX font shape <<pad,m,it,c>> seek padri8rn.mtx |
| 1036 |
\end{verbatim} |
| 1037 |
|
| 1038 |
The important point to notice is that \fontinst needs an |8r| encoded |
| 1039 |
\mtx file for each font when you are using the \verb|latinfamily| |
| 1040 |
command. If it can't find an |8r| encoded \mtx file, it'll look for |
| 1041 |
for an |8a| encoded \afm file. It will automatically turn the file it |
| 1042 |
finds into an |8r| encoded \mtx file. So when \fontinst says |
| 1043 |
`\verb|seek padr8r.mtx|', it is in fact looking for |
| 1044 |
\texttt{padr8r.mtx} and \texttt{padr8a.afm}. Whatever it finds, it |
| 1045 |
will end up with \verb|padr8r.mtx| to work on. |
| 1046 |
|
| 1047 |
The first line of the log shows that \fontinst is trying to create a |
| 1048 |
\vpl file for |pad/m/n|. That is, font family |pad| (Adobe Garamond), |
| 1049 |
font series |m| (normal `book' or `regular' weight), and font shape |
| 1050 |
|n| (normal upright). |
| 1051 |
|
| 1052 |
If it finds what it's looking for, it will create the files: |
| 1053 |
\begin{verbatim} |
| 1054 |
padr7t.vpl |
| 1055 |
padr8t.vpl |
| 1056 |
padr8c.vpl |
| 1057 |
\end{verbatim} |
| 1058 |
And add these lines to the given \fd files: |
| 1059 |
\begin{verbatim} |
| 1060 |
OT1pad.fd: \DeclareFontShape{OT1}{pad}{m}{n}{<<->> padr7t}{} |
| 1061 |
T1pad.fd: \DeclareFontShape{T1} {pad}{m}{n}{<<->> padr8t}{} |
| 1062 |
TS1pad.fd: \DeclareFontShape{TS1}{pad}{m}{n}{<<->> padr8c}{} |
| 1063 |
\end{verbatim} |
| 1064 |
This means you will have three new fonts to use in \LaTeX: the OT1, T1 |
| 1065 |
and TS1 encoded versions of |pad/m/n|. You'll be able to select (say) |
| 1066 |
|T1/pad/m/n| by saying: |
| 1067 |
\begin{verbatim} |
| 1068 |
\fontencoding{T1}\fontfamily{pad}\fontseries{m}\fontshape{n}\selectfont |
| 1069 |
\end{verbatim} |
| 1070 |
This is the clumsiest way of selecting that particular font, but I've |
| 1071 |
done it to illustrate exactly what's happening. |
| 1072 |
|
| 1073 |
The next line: |
| 1074 |
\begin{verbatim} |
| 1075 |
INFO>> to make LaTeX font shape <<pad,m,sc,>> seek padrc8r.mtx |
| 1076 |
\end{verbatim} |
| 1077 |
shows that \fontinst is trying to install a small caps font. If you |
| 1078 |
have a real small caps metric file named \texttt{padrc8r.mtx} (don't |
| 1079 |
forget it'll look for an |8a| encoded \afm file), \fontinst will go |
| 1080 |
ahead and create the \vpl file and \fd file entry as expected. |
| 1081 |
|
| 1082 |
But you don't normally have a real small caps font, so \fontinst will |
| 1083 |
quite happily produce a fake small caps font. To do this, it looks |
| 1084 |
for a suitable metric file by dropping the `|c|': |
| 1085 |
\begin{quote} |
| 1086 |
`Hmm\ldots\ I can't find \texttt{padrc8r}, so I'll look for |
| 1087 |
\texttt{padr8r}.' |
| 1088 |
\end{quote} |
| 1089 |
And you will eventually have: |
| 1090 |
\begin{verbatim} |
| 1091 |
padrc7t.vpl |
| 1092 |
padrc8t.vpl |
| 1093 |
\end{verbatim} |
| 1094 |
And add these lines to the given \fd files: |
| 1095 |
\begin{verbatim} |
| 1096 |
OT1pad.fd: \DeclareFontShape{OT1}{pad}{m}{sc}{<<->> padrc7t}{} |
| 1097 |
T1pad.fd: \DeclareFontShape{T1} {pad}{m}{sc}{<<->> padrc8t}{} |
| 1098 |
\end{verbatim} |
| 1099 |
(Note that it won't install a TS1-encoded small caps font because |
| 1100 |
TS1 is a text symbol font, which would look the same in the upright |
| 1101 |
and small caps shape.) |
| 1102 |
|
| 1103 |
The next log line shows \fontinst trying to create a \vpl for the |
| 1104 |
oblique version of Adobe Garamond: |
| 1105 |
\begin{verbatim} |
| 1106 |
INFO>> to make LaTeX font shape <<pad,m,sl,>> seek padro8r.mtx |
| 1107 |
\end{verbatim} |
| 1108 |
It's quite usual for an oblique version to be unavailable, but |
| 1109 |
\fontinst has a way round this: it can fake an oblique font from the |
| 1110 |
corresponding `straight' version: |
| 1111 |
\begin{quote} |
| 1112 |
`Oh dear: I can't find \texttt{padro8r}, so I'll look for |
| 1113 |
\texttt{padr8r} and use clever maths to fake a slanted version.' |
| 1114 |
\end{quote} |
| 1115 |
This is not as straightforward as the small caps case. \Fontinst |
| 1116 |
only works out what the metrics ought to be if the entire font is |
| 1117 |
slanted to the right. It's up to the DVI driver to actually print a |
| 1118 |
slanted font. \Dvips can do this. |
| 1119 |
|
| 1120 |
You will eventually have: |
| 1121 |
\begin{verbatim} |
| 1122 |
padro7t.vpl |
| 1123 |
padro8t.vpl |
| 1124 |
padro8c.vpl |
| 1125 |
\end{verbatim} |
| 1126 |
And these lines added to the given \fd files: |
| 1127 |
\begin{verbatim} |
| 1128 |
OT1pad.fd: \DeclareFontShape{OT1}{pad}{m}{sl}{<<->> padro7t}{} |
| 1129 |
T1pad.fd: \DeclareFontShape{T1} {pad}{m}{sl}{<<->> padro8t}{} |
| 1130 |
TS1pad.fd: \DeclareFontShape{TS1}{pad}{m}{sl}{<<->> padro8c}{} |
| 1131 |
\end{verbatim} |
| 1132 |
|
| 1133 |
The next line is straightforward: |
| 1134 |
\begin{verbatim} |
| 1135 |
INFO>> to make LaTeX font shape <<pad,m,it,>> seek padri8r.mtx |
| 1136 |
\end{verbatim} |
| 1137 |
If \fontinst can't find a suitable metrics file (\texttt{padri8r.mtx} |
| 1138 |
or \texttt{padri8a.afm}), it carries on without doing anything. If it |
| 1139 |
does find a suitable metrics file, it churns away until you will |
| 1140 |
eventually have: |
| 1141 |
\begin{verbatim} |
| 1142 |
padri7t.vpl |
| 1143 |
padri8t.vpl |
| 1144 |
padri8c.vpl |
| 1145 |
\end{verbatim} |
| 1146 |
And these lines added to the given \fd files: |
| 1147 |
\begin{verbatim} |
| 1148 |
OT1pad.fd: \DeclareFontShape{OT1}{pad}{m}{it}{<<->> padri7t}{} |
| 1149 |
T1pad.fd: \DeclareFontShape{T1} {pad}{m}{it}{<<->> padri8t}{} |
| 1150 |
TS1pad.fd: \DeclareFontShape{TS1}{pad}{m}{it}{<<->> padri8c}{} |
| 1151 |
\end{verbatim} |
| 1152 |
|
| 1153 |
The next line is a bit different. \Fontinst is now trying to create a |
| 1154 |
\vpl file for a \emph{condensed} font: |
| 1155 |
\begin{verbatim} |
| 1156 |
INFO>> to make LaTeX font shape <<pad,m,n,c>> seek padr8rn.mtx |
| 1157 |
\end{verbatim} |
| 1158 |
If it finds a suitable metric file (Adobe Garamond, medium weight, |
| 1159 |
normal upright shape, condensed), it will eventually produce: |
| 1160 |
\begin{verbatim} |
| 1161 |
padr7tn.vpl |
| 1162 |
padr8tn.vpl |
| 1163 |
padr8cn.vpl |
| 1164 |
\end{verbatim} |
| 1165 |
And these lines added to the given \fd files: |
| 1166 |
\begin{verbatim} |
| 1167 |
OT1pad.fd: \DeclareFontShape{OT1}{pad}{mc}{n}{<<->> padr7tn}{} |
| 1168 |
T1pad.fd: \DeclareFontShape{T1} {pad}{mc}{n}{<<->> padr8tn}{} |
| 1169 |
TS1pad.fd: \DeclareFontShape{TS1}{pad}{mc}{n}{<<->> padr8cn}{} |
| 1170 |
\end{verbatim} |
| 1171 |
There is no standard \LaTeX\ command like \verb|\bfseries| to select |
| 1172 |
the medium condensed (|mc|) series created here. If you want to use |
| 1173 |
this font, you must do something like: |
| 1174 |
\begin{verbatim} |
| 1175 |
\fontfamily{pad}\fontseries{mc}\selectfont |
| 1176 |
\end{verbatim} |
| 1177 |
If it doesn't find a suitable metric file for a narrow series, |
| 1178 |
\fontinst will just skip over and continue, unless you specifically |
| 1179 |
tell it to fake a narrow series. |
| 1180 |
|
| 1181 |
And so the process continues: \fontinst attempts to create \vpl files |
| 1182 |
for condensed versions of all the font shapes met so far, and then |
| 1183 |
goes on to: |
| 1184 |
\begin{verbatim} |
| 1185 |
INFO>> to make LaTeX font shape <<pad,b,n,>> seek padb8r.mtx |
| 1186 |
\end{verbatim} |
| 1187 |
And again, if it finds a suitable metric file (\texttt{padb8r.mtx} or |
| 1188 |
\texttt{padb8a.afm}), it'll potter off and create the files: |
| 1189 |
\begin{verbatim} |
| 1190 |
padb7t.vpl |
| 1191 |
padb8t.vpl |
| 1192 |
padb8c.vpl |
| 1193 |
\end{verbatim} |
| 1194 |
And these lines added to the given \fd files: |
| 1195 |
\begin{verbatim} |
| 1196 |
OT1pad.fd: \DeclareFontShape{OT1}{pad}{b}{n}{<<->> padb7t}{} |
| 1197 |
T1pad.fd: \DeclareFontShape{T1} {pad}{b}{n}{<<->> padb8t}{} |
| 1198 |
TS1pad.fd: \DeclareFontShape{TS1}{pad}{b}{n}{<<->> padb8c}{} |
| 1199 |
\end{verbatim} |
| 1200 |
With this step done, fontinst will try to create \vpl files for the |
| 1201 |
small caps, slanted, and italic versions of |pad/b|; and then it'll |
| 1202 |
try to create condensed versions of all those: |
| 1203 |
\begin{verbatim} |
| 1204 |
INFO>> to make LaTeX font shape <<pad,b,n,>> seek padb8r.mtx |
| 1205 |
INFO>> to make LaTeX font shape <<pad,b,sc,>> seek padbc8r.mtx |
| 1206 |
INFO>> to make LaTeX font shape <<pad,b,sl,>> seek padbo8r.mtx |
| 1207 |
INFO>> to make LaTeX font shape <<pad,b,it,>> seek padbi8r.mtx |
| 1208 |
INFO>> to make LaTeX font shape <<pad,b,n,c>> seek padb8rn.mtx |
| 1209 |
INFO>> to make LaTeX font shape <<pad,b,sc,c>> seek padbc8rn.mtx |
| 1210 |
INFO>> to make LaTeX font shape <<pad,b,sl,c>> seek padbo8rn.mtx |
| 1211 |
INFO>> to make LaTeX font shape <<pad,b,it,c>> seek padbi8rn.mtx |
| 1212 |
\end{verbatim} |
| 1213 |
If it manages to find the files it needs to create the \vpl files to |
| 1214 |
use all those fonts with \LaTeX, you'll end up with the following |
| 1215 |
lines in the T1 \fd file (I've ignored the OT1 \fd file to save some |
| 1216 |
space): |
| 1217 |
\begin{verbatim} |
| 1218 |
\DeclareFontShape{T1} {pad}{b} {n} {<<->> padb8t}{} |
| 1219 |
\DeclareFontShape{T1} {pad}{b} {sc}{<<->> padbc8t}{} |
| 1220 |
\DeclareFontShape{T1} {pad}{b} {sl}{<<->> padbo8t}{} |
| 1221 |
\DeclareFontShape{T1} {pad}{b} {it}{<<->> padbi8t}{} |
| 1222 |
\DeclareFontShape{T1} {pad}{bc}{n} {<<->> padb8tn}{} |
| 1223 |
\DeclareFontShape{T1} {pad}{bc}{sc}{<<->> padbc8tn}{} |
| 1224 |
\DeclareFontShape{T1} {pad}{bc}{sl}{<<->> padbo8tn}{} |
| 1225 |
\DeclareFontShape{T1} {pad}{bc}{it}{<<->> pckbi8tn}{} |
| 1226 |
\end{verbatim} |
| 1227 |
To translate into English: Adobe Garamond bold in `normal', small |
| 1228 |
caps, slanted, and italic versions, as well as condensed versions of |
| 1229 |
all four. |
| 1230 |
|
| 1231 |
Again, because there's no convenient way of selecting the condensed |
| 1232 |
versions with existing \LaTeX\ commands, you need to say something |
| 1233 |
like: |
| 1234 |
\begin{verbatim} |
| 1235 |
\fontfamily{pad}\fontseries{bc}\selectfont |
| 1236 |
\end{verbatim} |
| 1237 |
to use the bold condensed (|bc|) versions of this font; you can of |
| 1238 |
course use \verb|\itshape|, \verb|\scshape|, \verb|\slshape|, and |
| 1239 |
\verb|upshape| to switch between the italic, small caps, slanted, and |
| 1240 |
`normal' versions of Adobe Garamond bold condensed once you've got |
| 1241 |
|pad/bc| selected. |
| 1242 |
|
| 1243 |
So far, you've seen \verb|\latinfamily| look at two different weights |
| 1244 |
and two different widths. For each weight, \verb|\latinfamily| will |
| 1245 |
try and install eight different fonts as you can see above. It will |
| 1246 |
try and install the same eight different fonts for each of the |
| 1247 |
following different weights: |
| 1248 |
\begin{center} |
| 1249 |
\begin{tabular}{lll} |
| 1250 |
\emph{\LaTeX} & \emph{Fontname} & \emph{description} \\ |
| 1251 |
|ul| & |a| & ultra light \\ |
| 1252 |
|el| & |i| & extra light \\ |
| 1253 |
|l| & |l| & light \\ |
| 1254 |
|m| & |k|, |r| & book, regular \\ |
| 1255 |
|mb| & |m| & medium \\ |
| 1256 |
|db| & |d| & demi bold \\ |
| 1257 |
|sb| & |s| & semi bold \\ |
| 1258 |
|b| & |b| & bold \\ |
| 1259 |
|eb| & |c|, |h|, |x| & black, heavy, extra bold \\ |
| 1260 |
|ub| & |u| & ultra bold |
| 1261 |
\end{tabular} |
| 1262 |
\end{center} |
| 1263 |
The \LaTeX\ column contains the label that will be used in the |
| 1264 |
\verb|\DeclareFontShape| command to specify the font series. The |
| 1265 |
\Fontnamekb column contains the width specifier used to name the font |
| 1266 |
metric file that \fontinst will look for in that case. |
| 1267 |
|
| 1268 |
In other words, at some stage \fontinst will look for: |
| 1269 |
\begin{verbatim} |
| 1270 |
INFO>> to make LaTeX font shape <<pad,sb,n,>> seek pads8r.mtx |
| 1271 |
\end{verbatim} |
| 1272 |
and if it finds a suitable metric file (\texttt{pads8r.mtx} or |
| 1273 |
\texttt{pads8a.afm}), it will create: |
| 1274 |
\begin{verbatim} |
| 1275 |
pads7t.vpl |
| 1276 |
pads8t.vpl |
| 1277 |
pads8c.vpl |
| 1278 |
\end{verbatim} |
| 1279 |
and \fd file entries like this: |
| 1280 |
\begin{verbatim} |
| 1281 |
OT1pad.fd: \DeclareFontShape{OT1}{pad}{sb}{n}{<<->> pads7t}{} |
| 1282 |
T1pad.fd: \DeclareFontShape{T1} {pad}{sb}{n}{<<->> pads8t}{} |
| 1283 |
TS1pad.fd: \DeclareFontShape{TS1}{pad}{sb}{n}{<<->> pads8c}{} |
| 1284 |
\end{verbatim} |
| 1285 |
and since |sb| is not a normal \LaTeX\ font series, you'll need to use |
| 1286 |
something like: |
| 1287 |
\begin{verbatim} |
| 1288 |
\fontfamily{pad}\fontseries{sb}\selectfont |
| 1289 |
\end{verbatim} |
| 1290 |
to use this font. |
| 1291 |
|
| 1292 |
% For example, \verb|\latinfamily{ptm}{}| is |
| 1293 |
% syntactic sugar for: |
| 1294 |
% \begin{verbatim} |
| 1295 |
% \transformfont{ptmr8r}{\reencodefont{8r}{\fromafm{ptmr8a}}} |
| 1296 |
% \transformfont{ptmri8r}{\reencodefont{8r}{\fromafm{ptmri8a}}} |
| 1297 |
% \transformfont{ptmb8r}{\reencodefont{8r}{\fromafm{ptmb8a}}} |
| 1298 |
% \transformfont{ptmbi8r}{\reencodefont{8r}{\fromafm{ptmbi8a}}} |
| 1299 |
% \transformfont{ptmro8r}{\slantfont{167}{\frommtx{ptmr8r}}} |
| 1300 |
% \transformfont{ptmbo8r}{\slantfont{167}{\frommtx{ptmb8r}}} |
| 1301 |
% \installfonts |
| 1302 |
% \installfamily{T1}{ptm}{} |
| 1303 |
% \installfamily{OT1}{ptm}{} |
| 1304 |
% \installfont{ptmr8t}{ptmr8r,latin}{T1}{T1}{ptm}{m}{n}{} |
| 1305 |
% \installfont{ptmr7t}{ptmr8r,latin}{OT1}{OT1}{ptm}{m}{n}{} |
| 1306 |
% \installfont{ptmrc8t}{ptmr8r,latin}{T1c}{T1}{ptm}{m}{sc}{} |
| 1307 |
% \installfont{ptmrc7t}{ptmr8r,latin}{OT1c}{OT1}{ptm}{m}{sc}{} |
| 1308 |
% \installfont{ptmri8t}{ptmri8r,latin}{T1}{T1}{ptm}{m}{it}{} |
| 1309 |
% \installfont{ptmri7t}{ptmri8r,latin}{OT1i}{OT1}{ptm}{m}{it}{} |
| 1310 |
% \installfont{ptmro8t}{ptmro8r,latin}{T1}{T1}{ptm}{m}{sl}{} |
| 1311 |
% \installfont{ptmro7t}{ptmro8r,latin}{OT1}{OT1}{ptm}{m}{sl}{} |
| 1312 |
% \installfont{ptmb8t}{ptmb8r,latin}{T1}{T1}{ptm}{b}{n}{} |
| 1313 |
% \installfont{ptmb7t}{ptmb8r,latin}{OT1}{OT1}{ptm}{b}{n}{} |
| 1314 |
% \installfont{ptmbc8t}{ptmb8r,latin}{T1c}{T1}{ptm}{b}{sc}{} |
| 1315 |
% \installfont{ptmbc7t}{ptmb8r,latin}{OT1c}{OT1}{ptm}{b}{sc}{} |
| 1316 |
% \installfont{ptmbi8t}{ptmbi8r,latin}{T1}{T1}{ptm}{b}{it}{} |
| 1317 |
% \installfont{ptmbi7t}{ptmbi8r,latin}{OT1i}{OT1}{ptm}{b}{it}{} |
| 1318 |
% \installfont{ptmbo8t}{ptmbo8r,latin}{T1}{T1}{ptm}{b}{sl}{} |
| 1319 |
% \installfont{ptmbo7t}{ptmbo8r,latin}{OT1}{OT1}{ptm}{b}{sl}{} |
| 1320 |
% \endinstallfonts |
| 1321 |
% \end{verbatim} |
| 1322 |
|
| 1323 |
|
| 1324 |
The \texttt{basicex.tex} file in the \texttt{examples} directory of |
| 1325 |
the main \fontinst distribution is an annotated command file which |
| 1326 |
does roughly the same things as the \verb|\latinfamily| command for |
| 1327 |
the \texttt{pad} family of fonts. |
| 1328 |
|
| 1329 |
|
| 1330 |
\end{document} |