| 1 |
% |
| 2 |
% Copyright 1998, 1999, 2000 the fontinst maintenance team and any |
| 3 |
% individual authors listed elsewhere in this file. All rights reserved. |
| 4 |
% |
| 5 |
% This file is part of the fontinst system version 1.9. |
| 6 |
% ----------------------------------------------------- |
| 7 |
% |
| 8 |
% It may be distributed under the terms of the LaTeX Project Public |
| 9 |
% License, as described in lppl.txt in the base LaTeX distribution. |
| 10 |
% Either version 1.0 or, at your option, any later version. |
| 11 |
% |
| 12 |
\documentclass{ltxdoc} |
| 13 |
\usepackage[dolayout,fileispart]{fisource} |
| 14 |
|
| 15 |
\usepackage{longtable} |
| 16 |
|
| 17 |
\RecordChanges |
| 18 |
\EnableCrossrefs |
| 19 |
|
| 20 |
\IndexPrologue{% |
| 21 |
\section*{Index}% |
| 22 |
\addcontentsline{toc}{section}{Index}% |
| 23 |
\markboth{Index}{Index}% |
| 24 |
Compound numbers (numbers with a hyphen) refer to a code line, and |
| 25 |
the letter that is the first part of such a number specifies the |
| 26 |
source file the code line is in, as explained by the file key below. |
| 27 |
Simple numbers refer to pages. Numbers written in italics refer to |
| 28 |
places where the corresponding entry is described, the ones |
| 29 |
underlined to where it is defined, and the rest to where it is used. |
| 30 |
} |
| 31 |
\GlossaryPrologue{% |
| 32 |
\section*{Change History}% |
| 33 |
\addcontentsline{toc}{section}{Change History}% |
| 34 |
\markboth{Change History}{Change History}% |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
\makeatletter |
| 39 |
\newcommand{\offindex}{\let\index\@gobble} |
| 40 |
|
| 41 |
\newcommand{\consumption}{% |
| 42 |
\begingroup |
| 43 |
\endlinechar=`\&\relax |
| 44 |
\expandafter\endgroup\consumption@i |
| 45 |
} |
| 46 |
\def\consumption@i#1#2{% |
| 47 |
\ifhmode{\parskip=\z@\@plus\p@\relax\par}\fi |
| 48 |
Time elapsed: #1\,s\par |
| 49 |
\tabskip=\leftmargin \advance \tabskip 1em\relax |
| 50 |
\halign{&\hfil##\ \tabskip=\z@skip&##\hfil\tabskip=1em\cr |
| 51 |
\omit\span \textbf{Stacks}&\omit\span \textbf{Others}\cr |
| 52 |
\consumption@ii#2\@nil |
| 53 |
}% |
| 54 |
} |
| 55 |
% #1 = number of strings used |
| 56 |
% #3 = string characters used |
| 57 |
% #5 = words of memory used |
| 58 |
% #7 = number of multiletter control sequences used |
| 59 |
% Other parameters are garbage. |
| 60 |
\def\consumption@ii#1 #2 #4 #6 #8	&{% |
| 61 |
\consumption@iii{{#1}{#3}}{{#5}{#7}}% |
| 62 |
} |
| 63 |
\def\consumption@iii#1#2#3i,#5n,#6p,#7b,#8s#9\@nil{% |
| 64 |
#4& input sources& \@secondoftwo#2& multiletter control |
| 65 |
sequences\cr |
| 66 |
#6& parameters& \@firstoftwo#1& strings\cr |
| 67 |
#7& buffer characters& \@secondoftwo#1& string characters\cr |
| 68 |
#8& saved values& \@firstoftwo#2& main memory words\cr |
| 69 |
} |
| 70 |
\makeatother |
| 71 |
|
| 72 |
\newenvironment{smalldes}{% |
| 73 |
\list{}{% |
| 74 |
\setlength\labelwidth{0pt}% |
| 75 |
\setlength\itemindent{-\leftmargin}% |
| 76 |
\setlength\listparindent{1em}% |
| 77 |
\setlength\parsep{0pt}% |
| 78 |
\setlength\itemsep{0pt plus 1pt}% |
| 79 |
\setlength\topsep{\itemsep}% |
| 80 |
\let\makelabel\descriptionlabel |
| 81 |
}% |
| 82 |
}{\endlist} |
| 83 |
|
| 84 |
% \includeonly{} |
| 85 |
\iffalse |
| 86 |
\MakeShortVerb{\|} |
| 87 |
\fi |
| 88 |
|
| 89 |
\title{The \package{fontinst} utility} |
| 90 |
\author{Alan Jeffrey\and David Carlisle\and Sebastian Rahtz\and |
| 91 |
Ulrik Vieth\and Lars Hellstr\"om} |
| 92 |
|
| 93 |
\begin{document} |
| 94 |
\maketitle |
| 95 |
\tableofcontents |
| 96 |
\clearpage |
| 97 |
|
| 98 |
\part*{About the \package{fontinst} package} |
| 99 |
\addcontentsline{toc}{part}{The \package{fontinst} documentation} |
| 100 |
|
| 101 |
This document implements and describes version~1.9 of |
| 102 |
\package{fontinst}. |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
\section{Files} |
| 107 |
|
| 108 |
\subsection{Source files} |
| 109 |
|
| 110 |
The source for \package{fontinst} is currently split on the seven |
| 111 |
source files \texttt{fibasics.dtx} (basic \TeX\ initialisation and |
| 112 |
hackery), \texttt{ficommon.dtx} (commands for variables, integer |
| 113 |
expressions, and the like), \texttt{fimain.dtx} (actually making |
| 114 |
fonts), \texttt{fitrig.dtx} (trigonometry), \texttt{ficonv.dtx} |
| 115 |
(conversions between file formats, font transformations), |
| 116 |
\texttt{filtfam.dtx} (the \cs{latinfamily} command), and |
| 117 |
\texttt{fimapgen.dtx} (mapfile generation). |
| 118 |
|
| 119 |
|
| 120 |
\subsection{Generated files} |
| 121 |
|
| 122 |
By running the \package{docstrip} installation script |
| 123 |
\texttt{fontinst.ins}, the following files are generated: |
| 124 |
\begin{description} |
| 125 |
\item[\texttt{fontinst.sty}] This is the executable file that |
| 126 |
contains all the commands that set up the \package{fontinst} |
| 127 |
utility for use. |
| 128 |
\item[\texttt{xfntinst.sty}] This is a variant of |
| 129 |
\texttt{fontinst.sty} in which the |\latin|\-|family| command |
| 130 |
behaves differently with respect to from which fonts the digits |
| 131 |
are picked (see below). |
| 132 |
\item[\texttt{cfntinst.sty}] This is a variant of |
| 133 |
\texttt{fontinst.sty} which supports the old way of selecting |
| 134 |
boundarychar for fonts (i.e., by setting the integer |
| 135 |
|boundarychar|). It requires a bit more memory than |
| 136 |
\texttt{fontinst.sty} does. |
| 137 |
\item[\texttt{fontinst.ini}] This file contains some very basic |
| 138 |
initialization code. It is used in case \package{fontinst} is used |
| 139 |
under ini\TeX\ without a preloaded format. |
| 140 |
\item[\texttt{finstmsc.sty}] This file contains the routines for |
| 141 |
automatic map file generation, which can now generate map files |
| 142 |
for the \package{dvips} and \package{dvipdfm} drivers. The system |
| 143 |
is extendable, so users interested in generating map files for |
| 144 |
other drivers can extend the mapfile writer's capabilities by |
| 145 |
adding code to their \texttt{finstmsc.rc} files. \emph{Contributions |
| 146 |
of such code is welcome}. This file also contains some seldom-used |
| 147 |
code (the ENC to ETX conversion) that has been broken off from |
| 148 |
the main \package{fontinst} utility, as it almost always just sat |
| 149 |
there and used up space for no good reason. |
| 150 |
\item[\texttt{fontdoc.sty}] This file contains the \package{fontdoc} |
| 151 |
package, which can be used to typeset encoding and metric files. |
| 152 |
\item[\texttt{csc2x.tex}] This file contains the reglyphing commands |
| 153 |
that set up the common caps-and-small-caps to expert names |
| 154 |
conversion. See Subsections~\ref{Ssec:Des:Reglyph} |
| 155 |
and~\ref{Ssec:Reglyph} for details. |
| 156 |
\item[\texttt{csckrn2x.tex}] This file is a variant of |
| 157 |
\texttt{csc2x.tex}, which doesn't copy the commands that actually |
| 158 |
set glyphs. |
| 159 |
\item[\texttt{osf2x.tex}] This file is a variant of |
| 160 |
\texttt{csc2x.tex}, which only changes the names of digits. |
| 161 |
\end{description} |
| 162 |
|
| 163 |
\changes{1.914}{2000/05/14}{Generating \texttt{trig.sty} from |
| 164 |
source. (LH)} |
| 165 |
|
| 166 |
|
| 167 |
\subsection{Modules} |
| 168 |
|
| 169 |
The source is split up on the following \package{docstrip} modules: |
| 170 |
\begin{description} |
| 171 |
\item[\Module{boundaryCompability}, \texttt{fimain}] |
| 172 |
Guards code that is needed for \package{fontinst} to be compatible |
| 173 |
with the old interface for boundary ligatures and kerns. |
| 174 |
\item[\Module{!boundaryCompability}, \texttt{fimain}] |
| 175 |
Guards code that is used when \package{fontinst} is not to be |
| 176 |
compatible with the old interface for boundary ligatures and kerns. |
| 177 |
\item[\Module{debug}, \texttt{filtfam}] |
| 178 |
Guards code in the |\latinfamily| section that writes \texttt{INFO>} |
| 179 |
messages. |
| 180 |
\item[\Module{doc}, \texttt{fibasics}, \texttt{ficommon}, |
| 181 |
\texttt{fimain}, and \texttt{fimapgen}] |
| 182 |
Guards code that is to go into \texttt{fontdoc.sty}. |
| 183 |
\item[\Module{driver}, all files] |
| 184 |
Guards the driver code---the short piece of \LaTeX\ code in the |
| 185 |
beginning of each file that makes it possible to typeset as a |
| 186 |
\LaTeX\ document. \texttt{docstrip.ins} doesn't extract this |
| 187 |
code, but it is possible to write a script that makes |
| 188 |
\package{docstrip} extract this code if one wants to write a |
| 189 |
modified driver. It's not usual, though. |
| 190 |
\item[\Module{everyjob}, \texttt{fibasics}] |
| 191 |
Guards the code setting |\everyjob| for fontinst formats (by |
| 192 |
default not used). |
| 193 |
\item[\Module{!glyphs}, \texttt{ficonv}] |
| 194 |
Guards reglyphing setup code that is relevant when commands that |
| 195 |
set glyphs are not to be copied. |
| 196 |
\item[\Module{glyphs}, \texttt{ficonv}] |
| 197 |
Guards reglyphing setup code that is relevant when commands that |
| 198 |
set glyphs are to be copied. |
| 199 |
\item[\Module{ini}, \texttt{fibasics}] |
| 200 |
Guards the code for \texttt{fontinst.ini}. |
| 201 |
\item[\Module{map}, \texttt{fimapgen}] |
| 202 |
Guards the code for the automatic map file generation. |
| 203 |
\item[\Module{misc}, \texttt{fibasics}, \texttt{fimain}, and |
| 204 |
\texttt{ficonv}] |
| 205 |
Guards code that is only to go into \texttt{finstmsc.sty}. |
| 206 |
\item[\Module{!misc}, \texttt{fibasics}] |
| 207 |
Guards code that is not to go into \texttt{finstmsc.sty}. |
| 208 |
\item[\Module{obsolete}, \texttt{ficommon} and \texttt{fimain}] |
| 209 |
Guards miscellaneous pieces of code that are considered obsolete. |
| 210 |
\item[\Module{oldstyle}, \texttt{filtfam}] |
| 211 |
Guards code in the |\latinfamily| section. The purpose of that |
| 212 |
code is described in more detail in Section~\ref{Sec:NotesOnUsing}. |
| 213 |
\item[\Module{oldTeX}, \texttt{fibasics}] |
| 214 |
Guards code that copes with a bug in \TeX\ versions before 3.141. |
| 215 |
\item[\Module{!oldTeX}, \texttt{fibasics}] |
| 216 |
Guards normal code that wouldn't work satisfactory for |
| 217 |
\TeX\ versions before 3.141 due to a bug in those \TeX s. |
| 218 |
\item[\Module{pkg}, all files] |
| 219 |
Guards code that is to go into \texttt{fontinst.sty} (and its |
| 220 |
variants). |
| 221 |
\item[\Module{pkg2}, \texttt{fibasics}] |
| 222 |
A special variant of \Module{pkg} that is used for code that is |
| 223 |
to end up at the very end of \texttt{fontinst.sty}. |
| 224 |
\item[\Module{reglyphletters}, \texttt{ficonv}] |
| 225 |
Guards code that sets up for changing lower case letter names to |
| 226 |
corresponding smallcaps names. Used for \texttt{csc2x.tex} and |
| 227 |
\texttt{csckrn2x.tex}. |
| 228 |
\item[\Module{reglyphfigures}, \texttt{ficonv}] |
| 229 |
Guards code that sets up for changing ordinary figure names to |
| 230 |
corresponding \texttt{oldstyle} names. Used for |
| 231 |
\texttt{osf2x.tex}, \texttt{csc2x.tex}, and |
| 232 |
\texttt{csckrn2x.tex}. |
| 233 |
\item[\Module{reglyph}, \texttt{ficonv}] |
| 234 |
Guards code that is to go to the reglyphing setup files |
| 235 |
\texttt{csc2x.tex} and \texttt{csckrn2x.tex}. |
| 236 |
\item[\Module{textcomp}, \texttt{filtfam}] |
| 237 |
Guards code in the |\latinfamily| section that generates text symbol |
| 238 |
(\texttt{TS1}\slash ``text companion'') fonts. |
| 239 |
\item[\Module{underconstruction}, \texttt{fimain}] |
| 240 |
Guards some code that is ``under construction''. |
| 241 |
\end{description} |
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
\section{About previous \package{fontinst} releases} |
| 246 |
|
| 247 |
\subsection{Pre-\package{doc} fontinst releases} |
| 248 |
|
| 249 |
The following is a choice of some \package{fontinst} versions and some |
| 250 |
comments about them. The complete list of versions in the range |
| 251 |
v\,0.01--1.7 can be found in the file \texttt{CHANGES}. |
| 252 |
\begin{description} |
| 253 |
\item[v\,0.01] |
| 254 |
was begun by Alan Jeffrey in February 1993. This was the |
| 255 |
very first version recorded in the \texttt{CHANGES} file. |
| 256 |
% |
| 257 |
\item[v\,0.19] |
| 258 |
was completed in April 1993 and presented at the TUG~'93 |
| 259 |
conference in July 1993. It is described in the proceedings |
| 260 |
in \emph{TUGboat}~14\#3 and represents one of the earliest |
| 261 |
release versions, in which the user interface was still |
| 262 |
subject to change. |
| 263 |
% |
| 264 |
\item[v\,1.0] |
| 265 |
was begun in August 1993 right after the conference and |
| 266 |
represents the beginning of a complete re-write from scratch. |
| 267 |
% |
| 268 |
\item[v\,1.333] |
| 269 |
was presented one year later at the TUG~'94 conference and |
| 270 |
is described in the proceedings in \emph{TUGboat}~15\#3. |
| 271 |
It uses a different user interface, which is largely the same |
| 272 |
as in the present version, although the internals of the |
| 273 |
implementation have subsequently changed quite a bit. |
| 274 |
% |
| 275 |
\item[v\,1.335] |
| 276 |
was released in September 1994 and was the last ``official'' |
| 277 |
release version by Alan Jeffrey. Until the summer of 1998 this was |
| 278 |
still the version to be found in the \texttt{fonts}\slash |
| 279 |
\texttt{utilities}\slash\texttt{fontinst} directory on CTAN. |
| 280 |
It is considered obsolete and should not be used any longer. |
| 281 |
% |
| 282 |
\item[v\,1.400] |
| 283 |
was prepared in November 1994 and was the first version which |
| 284 |
used |8r|-encoded raw fonts as a basis for virtual fonts. |
| 285 |
% |
| 286 |
\item[v\,1.500] |
| 287 |
appeared on CTAN in \texttt{fonts}\slash\texttt{psfonts}\slash |
| 288 |
\texttt{tools} in September~1995 together with Sebastian Rahtz's |
| 289 |
Unix shell scripts to automate the installation. This version |
| 290 |
included a completely revised implementation of |\latinfamily| and |
| 291 |
added the |\installrawfont| command to install ligful raw fonts. |
| 292 |
% |
| 293 |
\item[v\,1.504] |
| 294 |
appeared on CTAN in \texttt{fonts}\slash\texttt{psfonts}\slash |
| 295 |
\texttt{tools} in January~1996. It added code to install (real or |
| 296 |
faked) small caps fonts and to fake narrow fonts, if they don't |
| 297 |
exist. |
| 298 |
% |
| 299 |
\item[v\,1.511] |
| 300 |
was one of the last beta versions by Alan Jeffrey which dates back |
| 301 |
to June~1996, but for some reason was never released. It uses |
| 302 |
the encodings |9o| and~|9d| instead of |9t| and~|9e| to install |
| 303 |
expertized oldstyle fonts, but this change never found its way |
| 304 |
into subsequent ``unofficial'' releases until v\,1.8. |
| 305 |
% |
| 306 |
\item[v\,1.6] |
| 307 |
appeared on CTAN in \texttt{fonts}\slash\texttt{psfonts}\slash |
| 308 |
\texttt{tools} in February~1997 and was the first ``unofficial'' |
| 309 |
version of \package{fontinst} maintained by Sebastian Rahtz. It |
| 310 |
contains only minor changes compared to v\,1.504, such as switching |
| 311 |
to lowercase file names, searching for |.pl| files before |.afm| |
| 312 |
files, and adding the \texttt{textcomp} installation to the |
| 313 |
distribution. |
| 314 |
% |
| 315 |
\item[v\,1.6] |
| 316 |
was re-issued on CTAN in September~1997, when the Unix shell |
| 317 |
scripts were replaced by Perl scripts. The \package{fontinst} |
| 318 |
package itself didn't change apart from minor changes of the |
| 319 |
debugging messages. |
| 320 |
% |
| 321 |
\item[v\,1.7] |
| 322 |
is the latest ``unofficial version'', which was released on CTAN |
| 323 |
in May~1998. It includes some changes to the mapping between |
| 324 |
\texttt{fontname} and \LaTeX{} weight codes proposed by Ulrik |
| 325 |
Vieth, as well as some code to support the use of |8r|-encoded |
| 326 |
|.afm| files generated by |ttf2afm|. |
| 327 |
% |
| 328 |
\end{description} |
| 329 |
% |
| 330 |
|
| 331 |
\subsection{About fontinst v\,1.8} |
| 332 |
|
| 333 |
Version~1.8 of the \package{fontinst} utility was the first to have |
| 334 |
been converted to \package{docstrip} format (this was made by Ulrik |
| 335 |
Vieth) and it was first released in June~1998. It is based on |
| 336 |
Sebastian Rahtz's ``unofficial'' \package{fontinst} releases v\,1.6 |
| 337 |
and~1.7 as of February~1997 and May~1998, which, in turn, are based |
| 338 |
on Alan Jeffrey's versions v\,1.500 and~1.504 of September~1995 |
| 339 |
and January~1996. In addition, version v\,1.8 also incorporated |
| 340 |
some code from Alan Jeffrey's last beta version, v\,1.511, |
| 341 |
which dates back to June~1996, but was never released to the |
| 342 |
general public for some reason. |
| 343 |
|
| 344 |
% It should be noted that all these versions differ significantly |
| 345 |
% from the previous ``official'' version v\,1.335 as of September~1994, |
| 346 |
% which was the only one to be found in the \texttt{fontinst} directory |
| 347 |
% on CTAN until the summer of 1998. Version v\,1.335 is now obsolete. |
| 348 |
|
| 349 |
Version~1.8 was agreed upon by the \package{fontinst} hacker community, |
| 350 |
as represented on the \package{fontinst} mailing list, as the new |
| 351 |
officially endorsed version, on which all further additions and |
| 352 |
enhancements can be based. |
| 353 |
|
| 354 |
|
| 355 |
\section{About this \package{fontinst} release} |
| 356 |
|
| 357 |
Versions 1.9xx of \package{fontinst} represent a more-or-less |
| 358 |
continuous evolution from 1999 to the present. Several improvements, |
| 359 |
the extents of which are perhaps not clearly represented in the version |
| 360 |
number increments, have been made in this series---sometimes as fixes |
| 361 |
to old bugs, but more often to introduce new features. The most |
| 362 |
important are: |
| 363 |
\begin{itemize} |
| 364 |
\item The old multiple |\setkern| bug, which resulted in pointless |
| 365 |
|KRN| instructions being written to (V)PL files have been fixed. |
| 366 |
In addition, it is now possible to reset kerns (using |
| 367 |
|\resetkern|) and unset kerns (using |\unsetkerns|, |
| 368 |
|\noleftkerning|, |\norightkerning|, or |\noleftrightkerning|). |
| 369 |
\item A bug which resulted in too few kerns being written to a font |
| 370 |
if the same glyph is used in more than one slot (this occurs if |
| 371 |
you make an all-caps font from an encoding definition file which |
| 372 |
sets |\lc|, |\lctop|, and |\lclig| to the same to their |
| 373 |
|\uc|\textellipsis\ counterparts) has been fixed. A consequence of |
| 374 |
this fix is that you cannot access the number of the slot that |
| 375 |
glyph \meta{glyph} has been assigned to as |\int|\marg{glyph} |
| 376 |
(unless you are using \texttt{cfntinst.sty}), but there really is |
| 377 |
no need for you to do so either. |
| 378 |
\item There is now a proper interface for using left and right |
| 379 |
boundaries which, in contrast to the old setting of the integer |
| 380 |
\texttt{boundarychar}, can make use of the full generality of the |
| 381 |
PL format. (The old interface is still available if you use |
| 382 |
\texttt{cfntinst.sty}.) |
| 383 |
\item \package{fontinst} can now interpret AFM files which contain |
| 384 |
non-integer dimensions. There is also a user-level interface for |
| 385 |
changing the formula according to which the italic corrections of |
| 386 |
glyphs are computed. |
| 387 |
\item The PL to MTX converter can now cope with the VPL-unique |
| 388 |
property lists |VTITLE|, |MAP|, and |MAPFONT|, which means that it |
| 389 |
can now convert VPL files as well. In addition to this, there are |
| 390 |
a couple of minor bugfixes and improvements in the PL to MTX |
| 391 |
conversion. |
| 392 |
\item There is now a way of overriding the PL to MTX converter's |
| 393 |
automatic choice of encoding definition file made based on the |
| 394 |
|CODINGSCHEME| property of a PL file. The command |\generalpltomtx| |
| 395 |
lets you select which encoding definition file you want to use, as |
| 396 |
does the new |\fromplgivenetx| transformed font command. |
| 397 |
\item Several \package{fontinst} commands that were previously |
| 398 |
missing have been added to the \package{fontdoc} package. The |
| 399 |
most significant are probably |\inputmtx| and |\inputetx|. |
| 400 |
\item There is now a way of automatically changing the names of |
| 401 |
glyphs in metric files generated from AFM files. |
| 402 |
% See Subsection~\ref{Ssec:Reglyph} for further details. |
| 403 |
\item The implementation of font metrics transformations, as done by |
| 404 |
|\transformfont|, has been rewritten and \package{fontinst} now |
| 405 |
handles uniform scaling internally; the driver only needs to do |
| 406 |
$x$-scaling and slanting. This can result in different font metrics, |
| 407 |
but we think only in that it comes out more like one would expect. |
| 408 |
The user interface is the same. |
| 409 |
\item There is now a new transformed font command |\fromany| which |
| 410 |
searches for a font metric file in any of the four formats MTX, |
| 411 |
PL, AFM, and VPL; converting it to MTX format and possibly |
| 412 |
generating a PL as well if necessary. This command is also used by |
| 413 |
|\installfont|, |\installrawfont|, and |\reglyphfont| to search |
| 414 |
for font metric files, so these can now take VPL files as a |
| 415 |
source for font metric data. |
| 416 |
\item There is now a mechanism for generating the necessary map files |
| 417 |
automatically. So far it knows how to generate map files for the |
| 418 |
\package{dvips} and \package{dvipdfm} drivers, but the system can |
| 419 |
easily be extended by adding code in the \texttt{finstmsc.rc} file. |
| 420 |
\item There are two new commands |\setscaled|\-|rawglyph| and |
| 421 |
|\setscaled|\-|notglyph| which generalize the |\setraw|\-|glyph| |
| 422 |
and |\setnot|\-|glyph| commands. These commands are described in |
| 423 |
Subsection~\ref{Ssec:Glyph-info}. |
| 424 |
\item The routines for converting metrics to (V)PL format have |
| 425 |
changed. As a result of this the metrics of fonts are likely to |
| 426 |
change (slightly), but the conversion is now more accurate than it |
| 427 |
used to be. A side-effect is that VPL files generated by |
| 428 |
\package{fontinst} can now be used directly as a base for other |
| 429 |
fonts (it used to be necessary to convert them to binary format and |
| 430 |
back to get the metrics right). |
| 431 |
\item \texttt{finstmsc.sty} now contains a new command which |
| 432 |
generates a Postscript encoding (\texttt{.enc}) file from an ETX |
| 433 |
file. The syntax of this command is |
| 434 |
\begin{quote} |
| 435 |
|\etxtoenc|\marg{etxfile}\marg{encfile} |
| 436 |
\end{quote} |
| 437 |
Usually you don't need to use this command, since the routines |
| 438 |
which generate map files will call it when the encoding used in a |
| 439 |
|\reencodefont| isn't known. |
| 440 |
\item The new command |
| 441 |
\begin{isyntax} |
| 442 |
|\installfontas|\marg{font}\marg{encoding}\marg{family}% |
| 443 |
\penalty0\marg{series}\penalty0\marg{shape}\penalty0\marg{size} |
| 444 |
\end{isyntax} |
| 445 |
adds an entry for \meta{font} with the given NFSS parameters to |
| 446 |
the corresponding FD file. |
| 447 |
\item The |\set|\textellipsis, |\reset|\textellipsis, and |
| 448 |
|\unset|\textellipsis\ commands now behaves as one would expect |
| 449 |
even when they occur between |\install|\-|fonts| and |\end|\-% |
| 450 |
|install|\-|fonts|---the assignments they make are no longer |
| 451 |
subject to the grouping around the metrics of individual fonts. |
| 452 |
Assignments made by these commands when they occur in MTX and ETX |
| 453 |
files \emph{are} however still subject to this grouping, so that |
| 454 |
behaves as usual. |
| 455 |
\item There are two control flow commands |\for| and |\foreach| |
| 456 |
which repeatedly execute a given sequence of commands---just like |
| 457 |
a normal programming language \texttt{for} loop. With |\for| the |
| 458 |
loop variable is an integer that is incremented or decremented by |
| 459 |
an amount that is specified in the beginning of the loop. With |
| 460 |
|\foreach| the loop variable is a string which assumes all the |
| 461 |
values given in a comma-separated list. |
| 462 |
\item The command |\offcommand| turns a command `off', i.e., makes |
| 463 |
it gobble its arguments and do nothing. The command |\oncommand| |
| 464 |
turns a command back on, i.e., restores the original definition of |
| 465 |
a command that had been turned off. Turning a command off or on |
| 466 |
when it is already off or on respectively has no effect. |
| 467 |
\item If you begin an item in the file-list argument (\#2) of |
| 468 |
|\install|\-|font| or |\install|\-|raw|\-|font| with the command |
| 469 |
|\metrics|, then that item (everything up till the next comma |
| 470 |
that is not inside a group) will be interpreted as explicit metric |
| 471 |
commands that are executed after the previous font was loaded and |
| 472 |
before the next is. Thus you can do e.g. |
| 473 |
\begin{quote} |
| 474 |
|\installfont{|\textellipsis|}{a,\metrics\unsetint{xheight},b,|% |
| 475 |
\textellipsis |
| 476 |
\end{quote} |
| 477 |
if you want font \texttt{a} to be loaded before font \texttt{b}, |
| 478 |
but want to use the \texttt{xheight} value of font \texttt{b}, |
| 479 |
and you don't want to bother writing an MTX file that simply |
| 480 |
contains the command |\unsetint{xheight}|. |
| 481 |
\item There is now a command |\fontinstcc| which switches to the |
| 482 |
catcodes that are in force for most of the time that |
| 483 |
\texttt{fontinst.sty} is read (|@| and |_| are letters, |~| is a |
| 484 |
space, and spaces and newlines are ignored). This makes it simpler |
| 485 |
to redefine internal control sequences. To switch back to the |
| 486 |
normal catcodes, there is the |\normalcc| command. Neither |
| 487 |
command has any arguments. |
| 488 |
\item The |\Unicode| command may be used to specify what |
| 489 |
ISO\,10646\slash Unicode character a slot corresponds to. See |
| 490 |
page~\pageref{Unicode} for details. |
| 491 |
\item The third arguments of the |\installfont| and |
| 492 |
|\install|\-|raw|\-|font| commands can now be a comma-separated |
| 493 |
list of ETX files. |
| 494 |
\item File names in the second and third arguments of |
| 495 |
|\install|\-|font| and |\install|\-|raw|\-|font| may now be |
| 496 |
suffixed by zero or more \emph{modifier clauses} that can change |
| 497 |
the interpretation of a file by e.g.~assigning special values to |
| 498 |
some variables while the file is read in. This is described in |
| 499 |
Subsection~\ref{Ssec:FontInstCmds} below. |
| 500 |
\item The |\setfontdimen| command allows an ETX file to declare |
| 501 |
which integer variables correspond to font dimensions in a (V)PL |
| 502 |
file. This correspondence is used both when generating a ligful |
| 503 |
(V)PL file and when a (V)PL file is converted to an MTX file. |
| 504 |
\item \texttt{finstmsc.sty} now contains a new command which |
| 505 |
generates a ToUnicode CMap file from an ETX file. The syntax of |
| 506 |
this command is |
| 507 |
\begin{quote} |
| 508 |
|\etxtocmap|\marg{etxfile}\marg{cmapfile} |
| 509 |
\end{quote} |
| 510 |
\item Unicode equivalents of slots need no longer be single |
| 511 |
characters. To specify a multiple-character equivalent of a |
| 512 |
slot, use the |\charseq| command and place the individual |
| 513 |
characters as |\Unicode| commands in its arguments. For a |
| 514 |
\texttt{fi} slot, one would say |
| 515 |
\begin{quote} |
| 516 |
|\charseq{|\\ |
| 517 |
| \Unicode{0066}{LATIN SMALL LETTER F}|\\ |
| 518 |
| \Unicode{0069}{LATIN SMALL LETTER I}|\\ |
| 519 |
|}| |
| 520 |
\end{quote} |
| 521 |
\item |
| 522 |
There are now three `actions' for files needed for a font: |
| 523 |
|\download|, |\fulldownload|, and |\encodingdownload|; |
| 524 |
corresponding to the prefixes |<|, |<<|, and |<[| respectively |
| 525 |
in a \package{dvips} map file. |
| 526 |
\item |
| 527 |
There is a documented way of turning off default substitutions: |
| 528 |
Make a |\substitutesilent| or |\substitutenoisy| with the |
| 529 |
\meta{from} argument also as \meta{to}. |
| 530 |
\item |
| 531 |
When ETX files are generated using |\enctoetx| then the original |
| 532 |
encoding names (as PS object and as file) are recorded and this |
| 533 |
information is made available to the map file writer when |
| 534 |
necessary. |
| 535 |
\end{itemize} |
| 536 |
|
| 537 |
|
| 538 |
\subsection{Metric packages} |
| 539 |
|
| 540 |
\package{fontinst} has traditionally come with a collection of MTX |
| 541 |
files that complement the MTX files generated from base font metrics, |
| 542 |
in that they build glyphs that may be missing from the base fonts or |
| 543 |
in some other way needs to be improved. The most well-known of these |
| 544 |
is the \texttt{latin.mtx} file; other examples include |
| 545 |
\texttt{textcomp.mtx}, \texttt{mathit.mtx}, and \texttt{latinsc.mtx}. |
| 546 |
A problem with these is however that they cannot produce optimal |
| 547 |
results for all fonts simply because there are irregular differences |
| 548 |
in how fonts are set up by the foundries. Most glyphs come out alright, |
| 549 |
but there are usually a few for which the parameters used are more or |
| 550 |
less wrong. Therefore most high quality font installations are made |
| 551 |
with modified versions of these files, where the parameters have been |
| 552 |
tuned to the specific font design. |
| 553 |
|
| 554 |
Modifying in particular \texttt{latin.mtx} is however not an entirely |
| 555 |
easy task, because this is a rather large file (with plenty of |
| 556 |
archaic pieces of code in curious places). Doing it once is no big |
| 557 |
problem, but if one has to do it several times (maybe because some |
| 558 |
errors are discovered in the original \texttt{latin.mtx}) then it is |
| 559 |
probably no fun anymore. Furthermore, if one has two or three |
| 560 |
modified copies of this file because one has made high quality |
| 561 |
installations of that many different fonts then even a trivial bugfix |
| 562 |
might start to feel like entirely too much work. |
| 563 |
|
| 564 |
If one has to make modifications then it is usually easier to deal |
| 565 |
with several small files (many of which can be used unchanged) than |
| 566 |
one big file. Thus it would be better if these big files were split up |
| 567 |
into several smaller ones. |
| 568 |
The main problem with splitting up something like \texttt{latin.mtx} |
| 569 |
is that there are some commands which are defined at the top and |
| 570 |
which are then used in almost all sections of the file. One must make |
| 571 |
certain that these commands are always loaded, which makes the metric |
| 572 |
files somewhat harder to use (especially if the one who tries to use |
| 573 |
them is not the one who wrote them). |
| 574 |
|
| 575 |
One strategy is to include all definitions needed for a metric file in |
| 576 |
it. This has the slight disadvantage that the commands will have to be |
| 577 |
defined several times. What is worse however, is that the command |
| 578 |
definitions will appear in several files, so if one finds a bug in one |
| 579 |
of them, one cannot simply correct this bug in one place. As the number |
| 580 |
of files can soon become quite large, correcting such bugs can become |
| 581 |
a boring procedure indeed. |
| 582 |
|
| 583 |
Another strategy is to put all the command definitions in one file |
| 584 |
and then explicitly include it in the \meta{file-list} argument of |
| 585 |
|\installfont|. This eliminates the repeated bug fixing problem, but |
| 586 |
requires the user to do something that the computer can actually do |
| 587 |
just as well. |
| 588 |
|
| 589 |
A third strategy is to put the command definitions in one or several |
| 590 |
files and then in each metric file the user explicitly mentions load |
| 591 |
the command definitions needed for that particular file. Metric |
| 592 |
packages uses an improved version of this strategy, since they also |
| 593 |
make it possible for fontinst to remember which packages (i.e., sets |
| 594 |
of command definitions) that have already been loaded, so that they |
| 595 |
are not unnecessarily loaded again. The \texttt{newlatin.mtx} file is |
| 596 |
an alternative to \texttt{latin.mtx} that implements this strategy. |
| 597 |
Most of the actual code is located in the following metric packages: |
| 598 |
\begin{longtable}{l p{0.7\linewidth}} |
| 599 |
\texttt{ltcmds.mtx}& Defines some common commands used by the other |
| 600 |
files.\\ |
| 601 |
\texttt{llbuild.mtx}& Builds the latin lower case alphabet |
| 602 |
(unaccented letters are `unfakable', the rest are constructed if |
| 603 |
not present in the base fonts).\\ |
| 604 |
\texttt{lubuild.mtx}& Builds the latin upper case alphabet.\\ |
| 605 |
\texttt{lsbuild.mtx}& Builds accented letters in the latin |
| 606 |
smallcaps alphabet, but only if there are unaccented letters to |
| 607 |
build them from in the base fonts.\\ |
| 608 |
\texttt{lsfake.mtx}& Fakes a latin smallcaps alphabet by shrinking |
| 609 |
the upper case alphabet, but only if the glyph had not already |
| 610 |
been manufactured.\\ |
| 611 |
\texttt{lsmisc.mtx}& Make some miscellaneous smallcaps glyphs |
| 612 |
(mostly ``smallcaps f-ligatures'').\\ |
| 613 |
\texttt{ltpunct.mtx}& Makes digits, punctuation marks, and other |
| 614 |
symbols (mostly by marking as ``unfakable''). |
| 615 |
\end{longtable} |
| 616 |
\noindent All of these are easy to use as components of equivalents |
| 617 |
of a modified \texttt{latin.mtx} files, and all dependencies of one |
| 618 |
package upon another are handled via explicit |\usemtxpackage| |
| 619 |
commands. |
| 620 |
|
| 621 |
For information on the syntax etcetera of commands related to metric |
| 622 |
packages, see Section~\ref{Sec:Metric files}. |
| 623 |
|
| 624 |
|
| 625 |
\subsection{Word boundary ligatures and kerns} |
| 626 |
|
| 627 |
One of the new features added in \TeX~3 was that of ligatures and |
| 628 |
kerns with word boundaries.\footnote{For purposes of ligatures and |
| 629 |
kerning, a `word' is a consecutive string of characters from a |
| 630 |
single font. These words thus typically include punctuation marks, |
| 631 |
unlike the `words' considered in hyphenation.} |
| 632 |
\package{fontinst} has had an interface |
| 633 |
for making such ligatures and kerns, but it has been completely |
| 634 |
redesigned in v\,1.9 and the old interface (setting the integer |
| 635 |
|boundarychar|) is no longer recognized by \package{fontinst}. Files |
| 636 |
which use the old interface can still be processed with |
| 637 |
\texttt{cfntinst.sty}, though. |
| 638 |
|
| 639 |
Before considering the new commands, it is suitable to define the |
| 640 |
concepts of proper glyph and pseudoglyph. A \emph{proper glyph} has |
| 641 |
been set using one of the commands |\setrawglyph|, |
| 642 |
|\set|\-|scaled|\-|raw|\-|glyph|, |\setglyph|, and |
| 643 |
|\reset|\-|glyph|. A pseudoglyph is any name used in the context of a |
| 644 |
glyph name which does not denote a proper glyph. If a pseudoglyph |
| 645 |
|g-not| was set using the |\setnotglyph| command, then |
| 646 |
|\ifisglyph{g-not}\then| will evaluate to true, but something can be |
| 647 |
a pseudoglyph even if an |\ifisglyph| test evaluates to false. The |
| 648 |
interesting point about pseudoglyphs when considering word boundaries |
| 649 |
however, is that a pseudoglyph can have ligatures and kerns. |
| 650 |
|
| 651 |
Kerns and ligatures at the left word boundary (beginning of word) are |
| 652 |
specified using the commands |\setleftboundary| and |
| 653 |
|\endsetleftboundary|, which are syntactically identical to |
| 654 |
|\setslot| and |\endsetslot| respectively. One important difference is |
| 655 |
however that the argument to |\setslot| must be a proper glyph, while |
| 656 |
the argument to |\setleftboundary| may be any glyph, hence a |
| 657 |
pseudoglyph will do just fine. |
| 658 |
|
| 659 |
|\ligature| commands between |\setleftboundary| and |
| 660 |
|\endsetleftboundary| will generate beginning of word ligatures. Kerns |
| 661 |
on the right of the glyph specified in |\setleftboundary| will become |
| 662 |
beginning of word kerns. |
| 663 |
|
| 664 |
Kerns and ligatures at the right word boundary (end of word) are |
| 665 |
trickier, due to the asymmetrical nature of the ligkern table in a PL |
| 666 |
file. What a font can do is to specify that the right word boundary, |
| 667 |
for purposes of kerning and ligatures, should be interpreted as |
| 668 |
character $n$. By including a kern or ligature with character $n$ on |
| 669 |
the right, that kern or ligature will be used at the end of a word, |
| 670 |
but it will also be used each time the next character is character |
| 671 |
$n$. Because of this, one usually wants the slot $n$, which the right |
| 672 |
word boundary is interpreted as being, to be empty whenever the |
| 673 |
encoding allows this. |
| 674 |
|
| 675 |
The command |
| 676 |
\begin{quote} |
| 677 |
|\setrightboundary|\marg{glyph} |
| 678 |
\end{quote} |
| 679 |
will mark the current slot as used to denote the right word boundary, |
| 680 |
and leave the slot empty, increasing the current slot number by one |
| 681 |
just like a |\setslot| \textellipsis\ |\endsetslot| block does. Kerns on |
| 682 |
the left of \meta{glyph} will be end of word kerns and |\ligature| |
| 683 |
commands with \meta{glyph} as the second argument will be for the end |
| 684 |
of a word. |
| 685 |
|
| 686 |
The command |
| 687 |
\begin{quote} |
| 688 |
|\makerightboundary|\marg{glyph} |
| 689 |
\end{quote} |
| 690 |
is similar to |\setrightboundary|, but it is a slot command which may |
| 691 |
only be used between a |\setslot| and the matching |\endsetslot|. Like |
| 692 |
|\setrightboundary|, it marks the current slot as used to denote the |
| 693 |
right word boundary, but the glyph specified in the enclosing |\setslot| |
| 694 |
will be written to that slot. Ligatures for the glyph specified by the |
| 695 |
|\setslot| and ligatures for the glyph specified by the |
| 696 |
|\makerightboundary| will both be for this single slot. Kerns on the |
| 697 |
right of the |\setslot| glyph and the |\makerightboundary| glyph will |
| 698 |
similarly both be for this single slot. The idea is that the |\setslot| |
| 699 |
glyph should be used when making a kern or ligature for that glyph, |
| 700 |
while the |\makerightboundary| glyph should be used when making a kern |
| 701 |
or ligature for the end of a word. \package{fontinst} will warn you if |
| 702 |
these two uses of the slot directly contradict each other. |
| 703 |
|
| 704 |
|
| 705 |
\subsection{Changing the names of glyphs} |
| 706 |
\label{Ssec:Des:Reglyph} |
| 707 |
|
| 708 |
Sometimes, primarily when making a virtual font from more than one raw |
| 709 |
font and two of the raw fonts contain different glyphs with the same |
| 710 |
name, it becomes necessary to change the names of some glyphs to make |
| 711 |
some sense out of it. The main source of this kind of trouble is the |
| 712 |
``caps and small caps'' (SC) and ``oldstyle figures'' (OsF) fonts |
| 713 |
within many commercial font families. The typical problem is that what |
| 714 |
is typographically different glyphs---such as the lowercase `a' |
| 715 |
(\texttt{a}, for \package{fontinst}) and the smallcaps `\textsc{a}' |
| 716 |
(\texttt{Asmall}, for \package{fontinst})---are given the same name by |
| 717 |
the foundry. |
| 718 |
|
| 719 |
One way to get round this is to say for example |
| 720 |
\begin{quote} |
| 721 |
|\setglyph{Asmall} \glyph{a}{1000} \endsetglyph|\\ |
| 722 |
|\setleftrightkerning{Asmall}{a}{1000}|\\ |
| 723 |
|\unsetglyph{a}|\\ |
| 724 |
|\noleftrightkerning{a}| |
| 725 |
\end{quote} |
| 726 |
and continuing like that for all the duplicate glyph names. This is |
| 727 |
however a rather prolix method and if the number of glyphs is large |
| 728 |
then it is usually simpler to use the |\reglyphfont| command. |
| 729 |
|
| 730 |
To reglyph one or several fonts, one writes |
| 731 |
\begin{quote} |
| 732 |
|\reglyphfonts|\\ |
| 733 |
\vadjust{}\quad \meta{reglyphing commands}\\ |
| 734 |
|\endreglyphfonts| |
| 735 |
\end{quote} |
| 736 |
There are two types of reglyphing commands: the |\reglyphfont| |
| 737 |
command, and the commands that modify what |\reglyphfont| will do to |
| 738 |
the fonts it operates on. The syntax of |\reglyphfont| is |
| 739 |
\begin{quote} |
| 740 |
|\reglyphfont|\marg{destination font}\marg{source font} |
| 741 |
\end{quote} |
| 742 |
The \meta{source font} font here is the name (suffix not included, of |
| 743 |
course) of the font metric file one wants to change the glyph names in. |
| 744 |
This font metric file can be in any of the formats MTX, PL, AFM, and |
| 745 |
VPL, and it will be converted to MTX format if it isn't already in |
| 746 |
that format (this happens just as for files listed in the second |
| 747 |
argument of |\installfont|). \meta{destination font} (which must be |
| 748 |
different from \meta{source font}) will be taken as the name for a |
| 749 |
new \texttt{.mtx} file that will be generated. The destination font |
| 750 |
can differ from the source font only in two ways: the names of some |
| 751 |
glyphs in the source font might be changed, and some of the commands |
| 752 |
from the source font might not have been copied to the destination |
| 753 |
font. To what extent the fonts are different is determined by what |
| 754 |
modifying commands have been executed; when no modifying commands |
| 755 |
have been executed, the source and destination font are equal. |
| 756 |
|
| 757 |
The modifying reglyphing commands are |
| 758 |
\begin{quote} |
| 759 |
|\renameglyph|\marg{to}\marg{from}\\ |
| 760 |
|\renameglyphweighted|\marg{to}\marg{from}\marg{weight}\\ |
| 761 |
|\killglyph|\marg{glyph}\\ |
| 762 |
|\killglyphweighted|\marg{glyph}\marg{weight}\\ |
| 763 |
|\offmtxcommand|\marg{command}\\ |
| 764 |
|\onmtxcommand|\marg{command} |
| 765 |
\end{quote} |
| 766 |
|\renameglyph| simply declares that occurrences of the glyph name |
| 767 |
\meta{from} should be replaced by the glyph name \meta{to}. To each |
| 768 |
glyph name is also assigned a \emph{weight}, which is used by a |
| 769 |
mechanism which conditions copying of commands from the source font to |
| 770 |
the destination font by the set of glyphs that command mentions. The |
| 771 |
details of this mechanism are however somewhat tricky, so those |
| 772 |
interested in the full generality should go to Subsection~\ref |
| 773 |
{Ssec:Reglyph}. Here it needs only be noted that if one applies |
| 774 |
|\killglyph| to a glyph name, then (under most circumstances) commands |
| 775 |
that refer to that glyph name will not be copied to the destination |
| 776 |
font. |
| 777 |
|
| 778 |
|\offmtxcommand| and |\onmtxcommand| also control whether commands are |
| 779 |
copied to the destination font, but they look at the actual command |
| 780 |
rather than the glyphs it refers to. For example, after the command |
| 781 |
\begin{quote} |
| 782 |
|\offmtxcommand{\setkern}| |
| 783 |
\end{quote} |
| 784 |
no |\setkern| commands will be copied. By using |\offmtxcommand|, it |
| 785 |
is possible to achieve effects similar to those of the files |
| 786 |
\texttt{kernoff.mtx} and \texttt{glyphoff.mtx}---the difference is |
| 787 |
that with |\offmtxcommand|, it happens at an earlier stage of the font |
| 788 |
generation. As expected, |\onmtxcommand| undoes the effect of |
| 789 |
|\offmtxcommand|. |
| 790 |
|
| 791 |
A special rule pertains to the |\set|\-|raw|\-|glyph|, |
| 792 |
|\set|\-|not|\-|glyph|, |\set|\-|scaled|\-|raw|\-|glyph|, and |
| 793 |
|\set|\-|scaled|\-|not|\-|glyph| commands, since |\transformfont| |
| 794 |
doesn't care what something was in the source font when it generates |
| 795 |
the transformed font. To turn these commands off while reglyphing, |
| 796 |
you use |\offmtx|\-|command| on |\set|\-|scaled|\-|raw|\-|glyph|. |
| 797 |
|
| 798 |
The effects of modifying reglyphing commands are delimited by |
| 799 |
|\reglyphfonts| and |\endreglyphfonts|, which starts and ends a group |
| 800 |
respectively. |
| 801 |
|
| 802 |
As we expect the most common reglyphing operation will be to go from SC |
| 803 |
glyph names to expert glyph names, there is a file \texttt{csc2x.tex} |
| 804 |
in the \package{fontinst} distribution which contains the modifying |
| 805 |
reglyphing commands needed for setting up that conversion. Thus you |
| 806 |
can write for example |
| 807 |
\begin{quote} |
| 808 |
|\reglyphfonts|\\ |
| 809 |
| \input csc2x|\\ |
| 810 |
| \reglyphfont{padrcx8r}{padrc8r}|\\ |
| 811 |
| \reglyphfont{padscx8r}{padsc8r}|\\ |
| 812 |
|\endreglyphfonts| |
| 813 |
\end{quote} |
| 814 |
to alter the glyph names in the SC fonts in the Adobe Garamond |
| 815 |
(\texttt{pad}) family. |
| 816 |
Note that the names of the destination fonts here really are rather |
| 817 |
arbitrary, since they will only exist as \texttt{.mtx} files, and |
| 818 |
thus only need to work within your local file system. In particular, |
| 819 |
all the |\setrawglyph| commands in the destination font files still |
| 820 |
refer to the source font, so it is that font which the drivers need |
| 821 |
to know about. |
| 822 |
|
| 823 |
|
| 824 |
\subsection{Making map file fragments} |
| 825 |
|
| 826 |
A \emph{map file fragment} is the lines\footnote{Not in general an |
| 827 |
entire map file, hence the word \emph{fragment}.} of a map file that |
| 828 |
the corresponding driver would need for handling some set of fonts. |
| 829 |
When told to, \package{fontinst} can (in a fairly automatic way) create |
| 830 |
the map file fragment which is needed for the set of raw fonts |
| 831 |
\package{fontinst} has (i) installed directly (using |\installrawfont|) |
| 832 |
or (ii) used as a base font for some installed virtual font (generated |
| 833 |
by |\installfont|). \package{fontinst} does not support the map file |
| 834 |
syntaxes of every existing driver, but the system is designed to be |
| 835 |
extendable and contributions that extend its capabilities are welcome. |
| 836 |
Nor can \package{fontinst} examine your \TeX\ system and |
| 837 |
determine every piece of information needed to make the correct map |
| 838 |
file fragments, but you can tell it roughly how your installation |
| 839 |
looks, it can make guesses which work most of the time, and you can |
| 840 |
specify most things explicitly if the guesses turn out to be wrong. |
| 841 |
Should the available options for configuring the process turn out to |
| 842 |
be inadequate for your needs, then please write to the |
| 843 |
\package{fontinst} mailing list about this---there is probably a way |
| 844 |
to improve the system so that your needs can be met. |
| 845 |
|
| 846 |
Now what does one have to do to use this map file fragment writer, |
| 847 |
then? First you need to tell \package{fontinst} to record the |
| 848 |
information the map file fragment writer needs. You do this by giving |
| 849 |
the command |
| 850 |
\begin{quote} |
| 851 |
|\recordtransforms{whatever.tex}| |
| 852 |
\end{quote} |
| 853 |
at the beginning of the run. Here \texttt{whatever.tex} is the name of |
| 854 |
a file that will be created, so you can use some other name if you |
| 855 |
like. After that you do all the calls to |\transform|\-|font|, |
| 856 |
|\install|\-|font|, |\install|\-|raw|\-|font|, |\latin|\-|family|, |
| 857 |
etc.\ you need to make the fonts you want. When you're done, you give |
| 858 |
the command |
| 859 |
\begin{quote} |
| 860 |
|\endrecordtransforms| |
| 861 |
\end{quote} |
| 862 |
and end the run (say |\bye|). The file \texttt{whatever.tex} will now |
| 863 |
contain the information about which fonts were used and what needs to |
| 864 |
be done with them. |
| 865 |
|
| 866 |
The second step is to actually run the map file fragment writer. |
| 867 |
Observe that it is located in the file \texttt{finstmsc.sty}, not |
| 868 |
\texttt{fontinst.sty}! The commands you need to give it can be so few |
| 869 |
that you can type them in at \TeX's \texttt{*} prompt, but if you are |
| 870 |
writing a command file then it should typically have the following |
| 871 |
structure (comments not necessary, of course): |
| 872 |
\begin{quote} |
| 873 |
\begin{tabular}{ll} |
| 874 |
|\input finstmsc.sty|& |%| Input command definitions\\ |
| 875 |
\meta{general settings} & |%| See below\\ |
| 876 |
|\adddriver|\marg{driver name}\marg{output file}& |
| 877 |
|%| Open output file\\ |
| 878 |
|\input whatever.tex|& |%| Write to output file\\ |
| 879 |
|\donedrivers|& |%| Close output file(s), tidy up\\ |
| 880 |
|\bye|& |%| Quit |
| 881 |
\end{tabular} |
| 882 |
\end{quote} |
| 883 |
The |\adddriver| command gives the order ``write map file entries for |
| 884 |
the \meta{driver name} DVI driver to the file \meta{output file}.'' The |
| 885 |
plan is that it should be possible to use the name of just about any |
| 886 |
major driver (\texttt{dvips}, \texttt{xdvi}, |
| 887 |
\texttt{pdftex},\footnote{pdf\TeX\ can read |
| 888 |
the map files generated for \texttt{dvips}, but a separate driver is |
| 889 |
desirable because the formats are not completely identical.} |
| 890 |
\texttt{OzTeX}, etc.) here and get suitable map file entries for that |
| 891 |
driver as output, but for the moment only the \texttt{dvips} and |
| 892 |
\texttt{dvipdfm}\footnote{Whose support I made very much to illustrate |
| 893 |
that you \emph{don't} have to be a big and ancient driver like |
| 894 |
\texttt{dvips} to have supporting code put into \package{fontinst}. |
| 895 |
(The fact that I just happened to have printed out the documentation and |
| 896 |
that is was easy to read also helped, of course.) Note, however, that |
| 897 |
there won't be any support for a driver unless someone sits down and |
| 898 |
writes the code for it! Don't assume I will. /LH} drivers are supported. |
| 899 |
You may also use \texttt{debug} for \meta{driver name}; the entries in |
| 900 |
the file for that ``DVI driver'' simply contain all the available |
| 901 |
information about each font (hence it should come handy for debugging |
| 902 |
code writing entries for real drivers) in a format that should be easy |
| 903 |
to interpret for a human. It could be the right choice if you're going |
| 904 |
to write the map file manually. |
| 905 |
|
| 906 |
The file \texttt{whatever.tex} in the above example contains the |
| 907 |
commands (|\makemapentry| commands) that actually cause entries to be |
| 908 |
written to the output file. It also contains a number of |\storemapdata| |
| 909 |
commands---these describe how some given font was made. If some |
| 910 |
metric file you have used contains |\setrawglyph| commands that were |
| 911 |
not automatically generated by \package{fontinst}, then there might |
| 912 |
not be a |\storemapdata| for the font they refer to in |
| 913 |
\texttt{whatever.tex}, so you will have to include such a command |
| 914 |
yourself somewhere. This can for example be done in the \meta{general |
| 915 |
settings} part of the above example file. The syntax of the |
| 916 |
|\storemapdata| command is described in Subsection~\ref{Ssec:interface}. |
| 917 |
|
| 918 |
Another class of things that will typically appear in the |
| 919 |
\meta{general settings} part above is commands that will inform the |
| 920 |
routines actually writing output about your \TeX\ system, about the set |
| 921 |
of fonts you are using on this run, or about something else that might |
| 922 |
be useful. Some such commands are of a general nature and affect what |
| 923 |
assumptions \package{fontinst} will make in certain conditions when no |
| 924 |
specific information is available. For the moment there commands are: |
| 925 |
\begin{description} |
| 926 |
\item[\cs{AssumeMetafont}] Assume all fonts with PL metrics are |
| 927 |
bitmaps generated by Metafont, and therefore make no entries for |
| 928 |
them. |
| 929 |
\item[\cs{AssumeAMSBSYY}] Assume all fonts with PL metrics have their |
| 930 |
\TeX\ names in all upper case as postscript names---just like the |
| 931 |
Computer Modern fonts in the AMS\slash Blue~Sky\slash Y\&Y |
| 932 |
distribution. |
| 933 |
\item[\cs{AssumeBaKoMa}] Assume all fonts with PL metrics have their |
| 934 |
\TeX\ names in all lower case as postscript names---just like the |
| 935 |
Computer Modern fonts in the BaKoMa distribution. |
| 936 |
\end{description} |
| 937 |
Otherwise the default action of the routine for finding out the |
| 938 |
postscript name of a font simply is to observe that it hasn't got a clue |
| 939 |
about what the right value is when the metrics were taken from a PL |
| 940 |
file, and therefore it writes `\texttt{??????}' for the postscript name. |
| 941 |
\begin{description} |
| 942 |
\item[\cs{AssumeLWFN}] Assume postscript fonts for which nothing |
| 943 |
else has been specified are stored in files which are named |
| 944 |
according to the \mbox{MacOS} scheme for |
| 945 |
\texttt{LWFN}s.%\footnote{LaserWriter FoNt} |
| 946 |
\end{description} |
| 947 |
Otherwise the default action is to use the name of the AFM or PL from |
| 948 |
which the metrics was originally taken, and add the file suffix stored |
| 949 |
in the string \texttt{PSfontsuffix}. The default value of this string |
| 950 |
is \texttt{.pfa}, but it can be changed using |\resetstr|. |
| 951 |
|
| 952 |
If neither the default nor the LWFN scheme produce correct results |
| 953 |
then you may use the more specific \DescribeMacro\specifypsfont |
| 954 |
|\specifypsfont| command, which describes exactly which file (or files, |
| 955 |
if any) a given font is stored in. For syntax and examples of usage, |
| 956 |
see Subsubsection~\ref{Sssec:Config-interface}. (I consider the |
| 957 |
semantics of this command to still be under development, but in order |
| 958 |
to know how to develop it further I need to know in which cases it is |
| 959 |
insufficient.) |
| 960 |
|
| 961 |
Finally, there is the |\declarepsencoding| command which is used to |
| 962 |
link ETX files to postscript encodings. If no postscript encoding has |
| 963 |
been linked to a given ETX file then \package{fontinst} will |
| 964 |
automatically create a postscript encoding (\texttt{.enc}) file for |
| 965 |
that encoding, and use this file for all reencoding commands. Again, |
| 966 |
see Subsubsection~\ref{Sssec:Config-interface} for syntax and examples |
| 967 |
of usage. The \texttt{8r} encoding is predeclared, and it doesn't |
| 968 |
matter if an encoding is undeclared if you never use it to reencode |
| 969 |
fonts, but there is potentially a problem with not having declared |
| 970 |
encodings you have installed and use for reencoding, as you may then |
| 971 |
find yourself having two files with identical names that define |
| 972 |
encodings that do not have the same name (as far as postscript is |
| 973 |
concerned). |
| 974 |
|
| 975 |
|
| 976 |
\subsection{On verbatim, typewriter, and monowidth fonts} |
| 977 |
|
| 978 |
The verbatim, typewriter, and monowidth concepts are common sources |
| 979 |
of confusion for those who use \package{fontinst} to install fonts |
| 980 |
with \AllTeX;\footnote{Myself \emph{not} excepted. /LH} in particular |
| 981 |
there are many misconceptions about the relation between them. The |
| 982 |
official view (of which not much has actually been brought forward) |
| 983 |
is that these concepts are really about three quite different things. |
| 984 |
|
| 985 |
A font is a \emph{monowidth} (monospaced, fixed-pitch) font if all |
| 986 |
glyphs in it have exactly the same width. Some font formats make |
| 987 |
special provisions for such fonts; the most notable example is the |
| 988 |
AFM format, where a single \texttt{CharWidth} keyword specifies the |
| 989 |
width for all glyphs in the font. \package{fontinst} responds to this |
| 990 |
by including the command |
| 991 |
\begin{quote} |
| 992 |
|\setint{monowidth}{1}| |
| 993 |
\end{quote} |
| 994 |
in the MTX file generated from an AFM, but that is everything that is |
| 995 |
hard-wired into the program. That a font is monowidth is however |
| 996 |
something that one should take note of when installing it for \TeX, |
| 997 |
as it means many of the glyphs in it have such a strange appearance |
| 998 |
that they are (pretty much) useless. The \texttt{endash} is for |
| 999 |
example usually only half as long as the \texttt{hyphen} and the |
| 1000 |
letters in ligature glyphs are only half as wide as normal letters. |
| 1001 |
Many of the ETX and MTX files that come with \package{fontinst} |
| 1002 |
contain special commands to avoid making use of such degenerate |
| 1003 |
glyphs. |
| 1004 |
|
| 1005 |
That a font is a \emph{typewriter} font really only means that it has |
| 1006 |
a typewriterish look about it. The two most familiar typewriter fonts |
| 1007 |
are probably Computer Modern Typewriter (\texttt{cmtt}) and Courier. |
| 1008 |
Both of these fonts are monowidth, but there is no absolute rule about |
| 1009 |
this. One of the standard \TeX\ fonts is for example Computer Modern |
| 1010 |
Variable-width Typewriter (\texttt{cmvtt}), which is not a monowidth |
| 1011 |
font, as Figure~\ref{Fig:TTvsVTT} shows. |
| 1012 |
\begin{figure} |
| 1013 |
\begin{tabular}{ll} |
| 1014 |
\texttt{cmtt}:& \fontfamily{cmtt}\selectfont |
| 1015 |
The quick brown fox jumps over the lazy dog.\\ |
| 1016 |
\texttt{cmvtt}:& \fontfamily{cmvtt}\selectfont |
| 1017 |
The quick brown fox jumps over the lazy dog. |
| 1018 |
\end{tabular} |
| 1019 |
\caption{Two typewriter fonts} |
| 1020 |
\label{Fig:TTvsVTT} |
| 1021 |
\end{figure} |
| 1022 |
|
| 1023 |
The verbatim concept has very little to do with fonts at all; in |
| 1024 |
\LaTeX\ it is considered to be a property of the environment |
| 1025 |
(\texttt{verbatim}, \texttt{macrocode}, etc.) rather than a property |
| 1026 |
of the font. The connection there is with fonts is that the encoding |
| 1027 |
of the font must contain visible ASCII (as defined in Appendix~C |
| 1028 |
of \emph{The \TeX book}~\cite{TeXbook}) as a subset for the text to |
| 1029 |
be rendered correctly. The \texttt{cmtt} family is the only one amongst |
| 1030 |
the original Computer Modern fonts which meets this criterium and |
| 1031 |
that is the primary grounds for the idea that these three concepts |
| 1032 |
should be connected. Today that reason is at best a very weak one, as |
| 1033 |
all \texttt{T1}-encoded fonts also meet the criterium of containing |
| 1034 |
visible ASCII as a subset. |
| 1035 |
|
| 1036 |
A circumstance which has probably added to the confusion is that |
| 1037 |
\texttt{OT1} is usually claimed to be an encoding. In reality the |
| 1038 |
Computer Modern fonts that are declared in \LaTeX\ as being |
| 1039 |
\texttt{OT1} display as many as five different encodings, as shown in |
| 1040 |
Table~\ref{Tab:OT1-fonts}. |
| 1041 |
\begin{table} |
| 1042 |
\begin{tabular}{lccc} |
| 1043 |
& \texttt{TEX TEXT}& |
| 1044 |
\begin{tabular}[b]{c}\texttt{TEX TEXT WITHOUT}\\ |
| 1045 |
\texttt{F-LIGATURES}\end{tabular}& |
| 1046 |
\texttt{TEX TYPEWRITER TEXT}\\ |
| 1047 |
\noalign{\medskip} |
| 1048 |
non-italic& |
| 1049 |
\begin{tabular}{l} |
| 1050 |
\texttt{cmb10}\\ |
| 1051 |
\texttt{cmbx5}--\texttt{12}\\ |
| 1052 |
\texttt{cmbxsl10}\\ |
| 1053 |
\texttt{cmdunh10}\\ |
| 1054 |
\texttt{cmff10}\\ |
| 1055 |
\texttt{cmfib8}\\ |
| 1056 |
\texttt{cmr6}--\texttt{17}\\ |
| 1057 |
\texttt{cmsl8}--\texttt{12}\\ |
| 1058 |
\texttt{cmss8}--\texttt{17}\\ |
| 1059 |
\texttt{cmssbx10}\\ |
| 1060 |
\texttt{cmssdc10}\\ |
| 1061 |
\texttt{cmssi8}--\texttt{17}\\ |
| 1062 |
\texttt{cmssq8}\\ |
| 1063 |
\texttt{cmssqi8}\\ |
| 1064 |
\texttt{cmvtt10} |
| 1065 |
\end{tabular}& |
| 1066 |
\begin{tabular}{l} |
| 1067 |
\texttt{cmcsc8}--\texttt{10}\\ |
| 1068 |
\texttt{cmr5} |
| 1069 |
\end{tabular}& |
| 1070 |
\begin{tabular}{l} |
| 1071 |
\texttt{cmsltt10}\\ |
| 1072 |
\texttt{cmtcsc10}\\ |
| 1073 |
\texttt{cmtt8}--\texttt{12} |
| 1074 |
\end{tabular}\\ |
| 1075 |
\noalign{\medskip} |
| 1076 |
italic& |
| 1077 |
\begin{tabular}{l} |
| 1078 |
\texttt{cmbxti10}\\ |
| 1079 |
\texttt{cmfi10}\\ |
| 1080 |
\texttt{cmti7}--\texttt{12}\\ |
| 1081 |
\texttt{cmu10} |
| 1082 |
\end{tabular}&& |
| 1083 |
\begin{tabular}{l} |
| 1084 |
\texttt{cmitt10} |
| 1085 |
\end{tabular} |
| 1086 |
\end{tabular} |
| 1087 |
\caption{``\texttt{OT1}-encoded'' Computer Modern fonts, collected |
| 1088 |
according to the actual font encoding} |
| 1089 |
\label{Tab:OT1-fonts} |
| 1090 |
\end{table} |
| 1091 |
Since most monowidth fonts are only used for setting verbatim text, |
| 1092 |
there is some code in \texttt{ot1.etx} which automatically chooses a |
| 1093 |
\texttt{TEX TYPEWRITER TEXT} encoding for the font when the |
| 1094 |
\texttt{monowidth} integer is set. The only reason for this is the |
| 1095 |
guess that this is what the user wanted. |
| 1096 |
|
| 1097 |
|
| 1098 |
\subsection{Tuning accent positions---an application of loops} |
| 1099 |
|
| 1100 |
The accent placements made by \texttt{latin.mtx} certainly aren't |
| 1101 |
perfect for all fonts, and the only way to find out where they should |
| 1102 |
be put is through trying in text the accented letters you get for a |
| 1103 |
couple of values for the position parameter and deciding which one |
| 1104 |
works best. Since to try one parameter value you need to (i) edit it |
| 1105 |
into an MTX file, (ii) run \package{fontinst}, (iii) run |
| 1106 |
\package{VPtoVF}, (iv) run \TeX\ on some test text, and (v) print that |
| 1107 |
text, trying one parameter value can take annoyingly much time. |
| 1108 |
Repeating the same procedure ten times to test ten values is not |
| 1109 |
something one does without being bored (unless one scripts it, of |
| 1110 |
course), but it is possible to try ten parameter values in a single |
| 1111 |
virtual font, and without doing very much typing. |
| 1112 |
|
| 1113 |
Say you're not too happy with how \texttt{latin.mtx} positions the |
| 1114 |
accent in the \texttt{ohungarumlaut} glyph: |
| 1115 |
\begin{quote} |
| 1116 |
|\setglyph{ohungarumlaut}|\\ |
| 1117 |
| \topaccent{o}{hungarumlaut}{500}|\\ |
| 1118 |
|\endsetglyph| |
| 1119 |
\end{quote} |
| 1120 |
The |500| is the horizontal position (in thousandths of the width of |
| 1121 |
the \texttt{o}) that the center of \texttt{hungarumlaut} in the glyph |
| 1122 |
constructed will have, so that is the position parameter value that |
| 1123 |
you want to change. Create an MTX file containing the code |
| 1124 |
\begin{quote} |
| 1125 |
|\for(pos){250}{750}{50}|\\ |
| 1126 |
| \setglyph{ohungarumlaut\strint{pos}}|\\ |
| 1127 |
| \topaccent{o}{hungarumlaut}{\int{pos}}|\\ |
| 1128 |
| \endsetglyph|\\ |
| 1129 |
| \setleftrightkerning{ohungarumlaut\strint{pos}}|\\ |
| 1130 |
| {ohungarumlaut}{1000}|\\ |
| 1131 |
|\endfor(pos)| |
| 1132 |
\end{quote} |
| 1133 |
This will set eleven glyphs \texttt{ohungarumlaut250}, |
| 1134 |
\texttt{ohungarumlaut300}, \texttt{ohungarumlaut350}, \textellipsis\,, |
| 1135 |
\texttt{ohungarumlaut750}, each being an Hungarianly umlauted `o' |
| 1136 |
(i.e., an `\H{o}') but all having that umlaut in slightly different |
| 1137 |
positions. In order to put them in a font, you also need to make an |
| 1138 |
encoding that contains them. Therefore create an ETX file which |
| 1139 |
contains the code |
| 1140 |
\begin{quote} |
| 1141 |
|\relax\encoding|\\ |
| 1142 |
|\nextslot{"C0}|\\ |
| 1143 |
|\for(pos){250}{750}{50}|\\ |
| 1144 |
| \setslot{ohungarumlaut\strint{pos}}|\\ |
| 1145 |
| \endsetslot|\\ |
| 1146 |
|\endfor(pos)|\\ |
| 1147 |
|\endencoding| |
| 1148 |
\end{quote} |
| 1149 |
The command for installing this experiment font would be something like |
| 1150 |
\begin{isyntax} |
| 1151 |
|\installfont|\marg{some name}|{|\meta{the normal list of metrics}% |
| 1152 |
|,|\penalty0\meta{the new MTX}|}|\penalty0 |
| 1153 |
|{ot1,|\meta{the new ETX}|}|\penalty0|{OT1}|\textellipsis |
| 1154 |
\end{isyntax} |
| 1155 |
The reason for including \texttt{ot1} in the third argument above is |
| 1156 |
that you'll need letters other than `\H{o}' against which you can |
| 1157 |
compare the experimental glyphs. It would not have been possible to |
| 1158 |
use \texttt{t1} instead of \texttt{ot1} (even though that has more |
| 1159 |
Hungarian letters) since that would set all slots in the font and |
| 1160 |
leave none for these experimental \texttt{ohungarumlaut}s. |
| 1161 |
|
| 1162 |
It is even possible to use a loop for making the test text. The |
| 1163 |
\LaTeX\ macros |
| 1164 |
\begin{verbatim} |
| 1165 |
\newcount\slotcount |
| 1166 |
\newcommand\testtext[3]{% |
| 1167 |
\slotcount=#1\relax |
| 1168 |
\begin{description}% |
| 1169 |
\loop\item[\the\slotcount]#3% |
| 1170 |
\ifnum #2>\slotcount \advance \slotcount 1 \repeat |
| 1171 |
\end{description}% |
| 1172 |
} |
| 1173 |
\DeclareTextCompositeCommand{\H}{OT1}{o}{\char\slotcount} |
| 1174 |
\end{verbatim} |
| 1175 |
will let you write |
| 1176 |
\begin{quote} |
| 1177 |
|\testtext|\marg{first}\marg{last}\marg{text} |
| 1178 |
\end{quote} |
| 1179 |
to get the text \meta{text} typeset once for each slot from |
| 1180 |
\meta{first} to \meta{last} inclusive, with |\H{o}| ranging through the |
| 1181 |
glyphs in this interval. Thus in this case |
| 1182 |
|\testtext|\penalty\hyphenpenalty|{"C0}|\penalty\hyphenpenalty|{"CA}|% |
| 1183 |
\penalty\hyphenpenalty|{Erd\H{o}s}| would be a trivial test. |
| 1184 |
|
| 1185 |
|
| 1186 |
\subsection{Font installation commands} |
| 1187 |
\label{Ssec:FontInstCmds} |
| 1188 |
|
| 1189 |
The |\installfont|, |\installrawfont|, and |\installfontas| commands |
| 1190 |
have the respective syntaxes |
| 1191 |
\begin{isyntax} |
| 1192 |
|\installfont|\marg{font-name}\marg{metrics}\marg{etx-list}\penalty0 |
| 1193 |
\marg{encoding}\marg{family}\marg{series}\marg{shape}\marg{size}\\ |
| 1194 |
|\installrawfont|\marg{font-name}\marg{metrics}\marg{etx-list}^^A |
| 1195 |
\penalty0 |
| 1196 |
\marg{encoding}\marg{family}\marg{series}\marg{shape}\marg{size}\\ |
| 1197 |
|\installfontas|\marg{font-name}\penalty0\marg{encoding}^^A |
| 1198 |
\marg{family}\marg{series}\marg{shape}\marg{size} |
| 1199 |
\end{isyntax} |
| 1200 |
The \meta{font-name} argument and the last five arguments are common |
| 1201 |
to all these commands. The first argument is the name of a \TeX\ font |
| 1202 |
to install. The last five arguments are the NFSS attributes under which |
| 1203 |
that font will be declared to \LaTeX---encoding, family, series, shape, |
| 1204 |
and size. It is worth observing that encoding names are usually in |
| 1205 |
upper case, whereas the family, series, and shape are usually in lower |
| 1206 |
case. The size argument is either a shorthand (declared using |
| 1207 |
\DescribeMacro{\declaresize}|\declaresize|) for a particular font |
| 1208 |
size (or range of font sizes), or an explicit list of font sizes or |
| 1209 |
ranges of sizes, which is copied directly to the font declaration. |
| 1210 |
The most common case is to let the size argument be empty, as that is |
| 1211 |
declared as a shorthand for ``any size''. |
| 1212 |
|
| 1213 |
The |\installfontas| command does not itself create the font, it just |
| 1214 |
makes a note that the specified font declaration should be written to |
| 1215 |
the proper FD file at |\end|\-|install|\-|fonts|. The |
| 1216 |
|\install|\-|font| and |\install|\-|raw|\-|font| commands do however |
| 1217 |
produce the font, in the sense that they write a VPL and PL |
| 1218 |
respectively file for the font. It depends solely on the \meta{metrics} |
| 1219 |
and \meta{etx-list} arguments what this font will contain. Many |
| 1220 |
features of these arguments are new with \package{fontinst} v\,1.9; |
| 1221 |
therefore the complete syntaxes are described below. |
| 1222 |
|
| 1223 |
Both arguments are comma-separated lists of basically file names (not |
| 1224 |
including an extension). The files listed in the \meta{metrics} are |
| 1225 |
font metric files which together build up a \emph{glyph base} |
| 1226 |
(definitions of glyphs and metrics related to one or several glyphs), |
| 1227 |
whereas the files listed in the \meta{etx-list} are encoding definition |
| 1228 |
files that select a subset of the glyph base for turning into a |
| 1229 |
\TeX\ font. The font metrics can be in either of the four formats |
| 1230 |
MTX, PL, AFM, and VPL, which are considered in that order. If the |
| 1231 |
metrics are not originally in MTX format then they will be converted |
| 1232 |
to this format (a new file will be created) before they are used. |
| 1233 |
The encoding definitions must be in ETX format. The files actually |
| 1234 |
read will have a suffix \texttt{.mtx}, \texttt{.pl}, \texttt{.afm}, |
| 1235 |
\texttt{.vpl}, or \texttt{.etx} appended to the name given, depending |
| 1236 |
on which format is expected. |
| 1237 |
|
| 1238 |
Within each element of the comma-separated list, the actual file name |
| 1239 |
is followed by zero or more \emph{modifier clause}s. A \meta{modifier |
| 1240 |
clause} consists of a \emph{keyword} followed by some number (usually |
| 1241 |
one) of \emph{arguments}, separated by spaces. The whole thing looks |
| 1242 |
a lot like the \meta{rule specifications} of e.g.\ the |\vrule| |
| 1243 |
command, but here the spaces are mandatory. The currently defined |
| 1244 |
\meta{modifier clause}s are |
| 1245 |
\begin{description} |
| 1246 |
\item[\mdseries\textvisiblespace\texttt{option}\textvisiblespace |
| 1247 |
\meta{string}] |
| 1248 |
Available for metric and encoding files. This adds \meta{string} |
| 1249 |
to the list of options for this file, which may affect what code |
| 1250 |
the file executes. The file can then test, using the |\ifoption| |
| 1251 |
command, whether a specific string is one of the options it was |
| 1252 |
given. |
| 1253 |
\item[\mdseries\textvisiblespace\texttt{scaled}\textvisiblespace |
| 1254 |
\meta{factor}] |
| 1255 |
Available for metric files. Causes the \texttt{rawscale} integer |
| 1256 |
variable to be set to the \meta{factor} (an integer expression) |
| 1257 |
while the file is being read. This scales glyphs and kerns that |
| 1258 |
are added to the glyph base by the \meta{factor}. |
| 1259 |
\item[\mdseries\textvisiblespace\texttt{suffix}\textvisiblespace |
| 1260 |
\meta{suffix}] |
| 1261 |
Available for metric files. Causes \meta{suffix} to be appended |
| 1262 |
to every glyph name appearing in a glyph or kern that file adds |
| 1263 |
to the glyph base. Thus ``\texttt{suffix /2}'' effectively |
| 1264 |
changes a |
| 1265 |
\begin{quote} |
| 1266 |
|\setrawglyph{a}|\dots |
| 1267 |
\end{quote} |
| 1268 |
to a |
| 1269 |
\begin{quote} |
| 1270 |
|\setrawglyph{a/2}|\dots |
| 1271 |
\end{quote} |
| 1272 |
\item[\mdseries\textvisiblespace\texttt{encoding}\textvisiblespace |
| 1273 |
\meta{etx-name}] |
| 1274 |
Available for metric files, and forces \package{fontinst} to |
| 1275 |
only consider the PL and VPL formats for this font. |
| 1276 |
As these file formats do not contain glyph names, an ETX file |
| 1277 |
is used to assign glyph names to the slots in the font. |
| 1278 |
This ETX file is usually selected according to the |
| 1279 |
\texttt{CODINGSCHEME} property of the PL or VPL (using the |
| 1280 |
correspondances set up via the |\declare|\-|encoding| command), |
| 1281 |
but that information is not always as one would want it (there |
| 1282 |
are even fonts for which it is quite wrong). An \texttt{encoding} |
| 1283 |
clause bypasses this automatic mechanism, so that the file |
| 1284 |
\meta{etx-name}\texttt{.etx} is used instead. |
| 1285 |
|
| 1286 |
% % The following is no longer true as of v1.926: |
| 1287 |
% \textbf{Note:} The first time that a file in PL or VPL format is |
| 1288 |
% used in a \meta{metrics} argument, a corresponding MTX file is |
| 1289 |
% generated. This means that if the same file reference is used |
| 1290 |
% another time then the reference will be to the MTX file, not to |
| 1291 |
% the original PL or VPL, and thus \texttt{encoding} clauses on |
| 1292 |
% subsequent uses will have no effect. Each font only has one |
| 1293 |
% encoding, so it usually makes no sense to switch the ETX file |
| 1294 |
% used to interpret a font, but since MTX files are not |
| 1295 |
% automatically deleted between runs there is a risk that this |
| 1296 |
% takes away the intended effect of an \texttt{encoding} clause. |
| 1297 |
|
| 1298 |
\item[\mdseries\textvisiblespace\texttt{mtxasetx}] |
| 1299 |
This is available for files in the \meta{etx-list}. The actual |
| 1300 |
function of a |
| 1301 |
\begin{quote} |
| 1302 |
\meta{file-name} \texttt{mtxasetx} |
| 1303 |
\end{quote} |
| 1304 |
item in the \meta{etx-list} is that the file |
| 1305 |
\meta{file-name}\texttt{.mtx} is inputted (\emph{not} |
| 1306 |
\meta{file-name}\texttt{.etx}) and that the correspondance |
| 1307 |
between glyph names and slot numbers set up in |
| 1308 |
|\set|\-|raw|\-|glyph| or |\set|\-|scaled|\-|raw|\-|glyph| |
| 1309 |
commands in this file is treated as if it had been set up by |
| 1310 |
|\setslot| commands in an ETX file. Provided the MTX file is |
| 1311 |
transformable, the glyph base will be unaffected. |
| 1312 |
|
| 1313 |
The purpose of this feature is to simplify quick and dirty |
| 1314 |
installations of odd fonts for which no suitable ETX file is |
| 1315 |
available. This can be useful in early stages of the design of |
| 1316 |
a new font, but is inferior to installation using proper ETX |
| 1317 |
files since one for example cannot specify any ligatures in |
| 1318 |
MTX files. |
| 1319 |
\end{description} |
| 1320 |
Furthermore there is a special exception for the \meta{metrics}: if |
| 1321 |
the first token in one of the list items is the control sequence |
| 1322 |
|\metrics|, then the rest of that item is interpreted as explicit |
| 1323 |
metric commands to execute. |
| 1324 |
|
| 1325 |
If the \meta{metrics} of two subsequent |\install|\-|font| |
| 1326 |
or |\install|\-|raw|\-|font| commands are identical then the glyph |
| 1327 |
bases will be identical as well. This creates an opportunity for |
| 1328 |
optimization, which \package{fontinst} makes use of by caching glyph |
| 1329 |
bases from one installation command to the next so that the glyph |
| 1330 |
base does not have to be rebuilt in these cases. A side-effect of |
| 1331 |
this caching is that local assignments made between two font |
| 1332 |
installation commands are cleared out with the glyph base, but |
| 1333 |
|\setint| and similar \package{fontinst} commands make global |
| 1334 |
assignments when used in such positions. |
| 1335 |
|
| 1336 |
Some examples might be in order. The first is an adaptation of an |
| 1337 |
installation command from \texttt{mfnt-0.59}~\cite{mfnt} by |
| 1338 |
Matthias Clasen and Ulrik Vieth: the installation command for the |
| 1339 |
8-bit math font \texttt{xma1000} (which can be thought of as being |
| 1340 |
to \texttt{cmmi10} sort of as \texttt{ecrm1000} is to \texttt{cmr10}). |
| 1341 |
The first three \texttt{encoding} clauses are more fine-tuning---without |
| 1342 |
them, a few glyphs would get incorrect names---but the last two are |
| 1343 |
quite essential, as the \texttt{msam10} and \texttt{msbm10} fonts |
| 1344 |
incorrectly claim to have the coding scheme \texttt{TEX MATH |
| 1345 |
SYMBOLS}. |
| 1346 |
\begin{verbatim} |
| 1347 |
\installfont{xma1000}{% |
| 1348 |
yma1000 encoding mcin,% |
| 1349 |
cmr10 encoding ot1upright,% |
| 1350 |
cmmi10,% |
| 1351 |
cmsy10 encoding omscal,% |
| 1352 |
msam10 encoding msam,% |
| 1353 |
msbm10 encoding msbm,% |
| 1354 |
mccmhax,mccmkern,mcmissing,% |
| 1355 |
cmsy10-base,cmsy10-extra% |
| 1356 |
}{mc}{MC}{cm}{m}{n}{<10->} |
| 1357 |
\end{verbatim} |
| 1358 |
Also note the explicit \LaTeX\ size specification for the range |
| 1359 |
``10\,pt and up''. |
| 1360 |
|
| 1361 |
The second example makes use of a \texttt{suffix} clause to combine |
| 1362 |
the letters from one font with the digits from another. |
| 1363 |
\begin{verbatim} |
| 1364 |
\installfont{msbrj8t}{msbr8r,msbrc8r suffix /2,latin}{digit2,t1} |
| 1365 |
{T1}{msbj}{m}{n}{} |
| 1366 |
\end{verbatim} |
| 1367 |
In this case, the glyph base contains the glyphs of Monotype Sabon |
| 1368 |
(SabonMT)---under names such as \texttt{A} for `A', \texttt{a} for |
| 1369 |
`a', and \texttt{one} for a lining digit one---as well as the |
| 1370 |
glyphs of Monotype Sabon Small Caps and Oldstyle Figures |
| 1371 |
(SabonMT-SCOSF)---under names such as \texttt{A/2} for `A', |
| 1372 |
\texttt{a/2} for `\textsc{a}', and \texttt{one/2} for a hanging |
| 1373 |
digit one. The \texttt{digit2.etx} file simply makes the definition |
| 1374 |
\begin{verbatim} |
| 1375 |
\setcommand\digit#1{#1/2} |
| 1376 |
\end{verbatim} |
| 1377 |
which causes \texttt{t1.etx} to put \texttt{zero/2} in slot 48 (digit |
| 1378 |
zero), \texttt{one/2} in slot 49 etc., instead of as it normally |
| 1379 |
would \texttt{zero} in slot 48, \texttt{one} in slot 49 and so on. |
| 1380 |
The net effect is that the digits in the generated \texttt{msbrj8t} |
| 1381 |
is from \texttt{msbrc8r} (SabonMT-SCOSF) but everything else is from |
| 1382 |
\texttt{msbr8r} (SabonMT). |
| 1383 |
|
| 1384 |
The third example makes use of an \texttt{mtxasetx} clause to install |
| 1385 |
(with its default encoding) a font for which creating an appropriate |
| 1386 |
ETX file seems not worth the trouble. |
| 1387 |
\begin{verbatim} |
| 1388 |
\installrawfont{psyr}{psyr,\metrics |
| 1389 |
\setint{xheight}{\height{alpha}} |
| 1390 |
}{txtfdmns,psyr mtxasetx}{U}{psy}{m}{n}{} |
| 1391 |
\end{verbatim} |
| 1392 |
The effect of the second \texttt{psyr} is that \texttt{psyr.mtx} is |
| 1393 |
read (in case there was no \texttt{psyr.mtx} then it is created from |
| 1394 |
(hopefully) \texttt{psyr.afm}) and the information in it will form |
| 1395 |
the glyph base. Because of the |\metrics| control sequence, the rest |
| 1396 |
of that item will be interpreted as explicit metric commands |
| 1397 |
modifying the glyph base, and thus the |\setint| command can provide |
| 1398 |
a value for the \texttt{xheight} variable (there doesn't seem to be |
| 1399 |
such a value in the AFM). Once the glyph base is completed, the |
| 1400 |
|\install|\-|raw|\-|font| starts writing the file \texttt{psyr.pl} |
| 1401 |
(that's for the first \texttt{psyr}). The encoding of that font will, |
| 1402 |
because of the \texttt{psyr mtxasetx}, be the same as that used in |
| 1403 |
\texttt{psyr.mtx}. Finally, the \texttt{txtfdmns} is for |
| 1404 |
\texttt{txtfdmns.etx}, an ETX file which sets fontdimens 1--16 as for |
| 1405 |
a \texttt{T1} encoded font but does not set any slots. Since |
| 1406 |
\texttt{psyr.mtx} reinterpreted as an ETX file sets slots but no |
| 1407 |
fontdimens, these complement each other nicely. |
| 1408 |
|
| 1409 |
|
| 1410 |
|
| 1411 |
\begingroup |
| 1412 |
\renewcommand\thesubsection{\thesection.\ensuremath{\infty}} |
| 1413 |
|
| 1414 |
\subsection{Coming attractions} |
| 1415 |
|
| 1416 |
We\footnote{Well, perhaps it's just me. /LH} have some new features |
| 1417 |
which we have pretty much sorted out how they should work and how they |
| 1418 |
should be implemented, but didn't want to introduce in this version as |
| 1419 |
the large modifications in core systems would require another |
| 1420 |
pre-release version before the proper release. Instead these features |
| 1421 |
will probably appear in the first pre-release of \package{fontinst} |
| 1422 |
v\,2.0. |
| 1423 |
|
| 1424 |
|
| 1425 |
\subsubsection{Bounding boxes} |
| 1426 |
|
| 1427 |
Han The Thanh has created an implementation of bounding box support |
| 1428 |
for \package{fontinst}, and it is a modified form of that support |
| 1429 |
that will make it into \package{fontinst} v\,2.0. One important |
| 1430 |
characteristic of this implementation is that the dimensions of the |
| 1431 |
bounding box are not bundled into the same data structure (the |
| 1432 |
|\g-|\meta{glyph} macros) as the glyph's width, height, depth, and |
| 1433 |
italic correction are, but stored in a separate data structure (the |
| 1434 |
|\gb-|\meta{glyph} macros). A glyph doesn't need to have its bounding |
| 1435 |
box set, it is simply a piece of information that \package{fontinst} |
| 1436 |
will store if you tell it to and which you can later retrieve. |
| 1437 |
|
| 1438 |
The bounding box will be stored as coordinates of the sides in the |
| 1439 |
normal AFM coordinate system. The commands for retrieving these |
| 1440 |
coordinates will probably be |
| 1441 |
\begin{center} |
| 1442 |
\begin{tabular}{ll} |
| 1443 |
\textbf{Command}& \textbf{Side}\\ |
| 1444 |
|\bbtop|\marg{glyph}& top ($y$-coordinate)\\ |
| 1445 |
|\bbbottom|\marg{glyph}& bottom ($y$-coordinate)\\ |
| 1446 |
|\bbleft|\marg{glyph}& left ($x$-coordinate)\\ |
| 1447 |
|\bbright|\marg{glyph}& right ($x$-coordinate) |
| 1448 |
\end{tabular} |
| 1449 |
\end{center} |
| 1450 |
In Thanh's implementation the command names are |\ury|, |\lly|, |
| 1451 |
|\llx|, and |\urx| respectively instead, but I think the former are |
| 1452 |
easier to remember. If no bounding box has been set for a glyph then |
| 1453 |
the above commands will instead report the corresponding coordinate of |
| 1454 |
the glyph's \TeX\ box (i.e.\ |\height|\marg{glyph}, |
| 1455 |
|\neg{\depth|\marg{glyph}|}|, |0|, and |\width|\marg{glyph} |
| 1456 |
respectively). |
| 1457 |
|
| 1458 |
The command for setting the bounding box of a glyph will be |
| 1459 |
\begin{quote} |
| 1460 |
|\setglyphbb|\marg{glyph}\marg{left}\marg{bottom}\marg{right}^^A |
| 1461 |
\marg{top} |
| 1462 |
\end{quote} |
| 1463 |
|
| 1464 |
|
| 1465 |
|
| 1466 |
\endgroup |
| 1467 |
|
| 1468 |
|
| 1469 |
\section{Notes on using \package{fontinst}} |
| 1470 |
\label{Sec:NotesOnUsing} |
| 1471 |
|
| 1472 |
The primary purpose of \package{fontinst} is to simplify the |
| 1473 |
installation of PostScript or TrueType text fonts. |
| 1474 |
|
| 1475 |
|
| 1476 |
\subsection{General notes} |
| 1477 |
|
| 1478 |
Leaving aside unusual variants which require special attention such |
| 1479 |
as alternate or swash fonts, almost all standard font families can |
| 1480 |
be installed automatically using the |\latinfamily| command, |
| 1481 |
optionally making use of the corresponding expert fonts as well. |
| 1482 |
|
| 1483 |
Depending on what kind of fonts you have and want to install, |
| 1484 |
|\latinfamily| supports three different modes of operation: |
| 1485 |
|
| 1486 |
|\latinfamily|\marg{fam}|{}| installs a normal font family using |
| 1487 |
|8a|-encoded standard fonts (reencoded to |8r|) and nothing else. |
| 1488 |
It installs |.fd| files for the \LaTeX{} families \texttt{8r}\meta{fam}, |
| 1489 |
\texttt{OT1}/\meta{fam}, \texttt{T1}/\meta{fam} and |
| 1490 |
\texttt{TS1}/\meta{fam}, and generates virtual fonts for the |7t|, |
| 1491 |
|8t|, and |8c| encodings. This is the only option available for most |
| 1492 |
typefaces which do not have an expert set. |
| 1493 |
|
| 1494 |
|\latinfamily{|\meta{fam}|x}{}| installs an expertized font family using |
| 1495 |
|8a|-encoded standard fonts (reencoded to |8r|) and |8x|-encoded |
| 1496 |
expert fonts. It installs |.fd| files for the \LaTeX{} families, |
| 1497 |
\texttt{OT1}/\meta{fam}\texttt{x}, \texttt{T1}/\meta{fam}\texttt{x} and |
| 1498 |
\texttt{TS1}/\meta{fam}\texttt{x}, and generates virtual fonts for the |
| 1499 |
|9t|, |9e| and |9c| encodings. |
| 1500 |
|
| 1501 |
|\latinfamily{|\meta{fam}|j}{}| installs an expertized font family with |
| 1502 |
oldstyle digits using |8a|-encoded standard fonts (reencoded to |
| 1503 |
|8r|) and |8x|-encoded expert fonts. It installs |.fd| files for |
| 1504 |
the \LaTeX{} families, |OT1|/\meta{fam}|j|, |T1|/\meta{fam}|j| and |
| 1505 |
|TS1|/\meta{fam}|j|, and generates virtual fonts for the |9o|, |9d| and |
| 1506 |
|9c| encodings. Since \texttt{TS1} has oldstyle digits by default, the |
| 1507 |
|9c|-encoded fonts should be the same as in the previous case. Finally, |
| 1508 |
|\latinfamily{|\meta{fam}|9}{}| is also supported as an alternative to |
| 1509 |
|\latinfamily{|\meta{fam}|j}{}| for backwards compatibility. |
| 1510 |
|
| 1511 |
The whole installation process relies on certain assumptions about |
| 1512 |
the symbol complement of Adobe's expert fonts. In particular, it is |
| 1513 |
assumed that the expert fonts include the oldstyle digits and a |
| 1514 |
complete set of small caps glyphs, which is an assumption that's not |
| 1515 |
always satisfied for expert fonts by other suppliers. If these |
| 1516 |
glyphs are not included in the expert fonts, the only way to get |
| 1517 |
them is from real small caps fonts, but this requires some |
| 1518 |
reshuffling of glyph names. |
| 1519 |
|
| 1520 |
To support such unusual cases, this source file contains some |
| 1521 |
optional code embedded between \Module{*oldstyle} \dots\ |
| 1522 |
\Module{/oldstyle}, |
| 1523 |
which extends the behaviour of |\latinfamily| for expertized |
| 1524 |
encodings with oldstyle digits. Instead of relying only on the |
| 1525 |
glyphs of the |8r|-reencoded raw font and the |8x|-encoded expert |
| 1526 |
font, this version also looks for corresponding OsF or SC\&OsF fonts |
| 1527 |
and uses the default digits from those fonts as oldstyle digits. |
| 1528 |
|
| 1529 |
|
| 1530 |
\subsection{Notes on small caps and oldstyle fonts} |
| 1531 |
|
| 1532 |
The |\latinfamily| command is supposed to do a reasonably good job |
| 1533 |
of installing a complete font family based on all the |.afm| files |
| 1534 |
it can find. If it doesn't find a suitable font shape, it is |
| 1535 |
sometimes possible to fake it by default substitutions. However, in |
| 1536 |
the case of small caps fonts, there are several options which may |
| 1537 |
require some clarification. |
| 1538 |
|
| 1539 |
For the majority of typefaces, a font family typically consists only |
| 1540 |
of of roman and italic fonts in several weights. Since real small |
| 1541 |
caps fonts are not included, they have to be faked from the roman |
| 1542 |
fonts, which is implemented by setting |\encoding_shape| to `|c|', |
| 1543 |
so that different encoding files |OT1c.etx| or |T1c.etx| are used. |
| 1544 |
Since these files call for glyph names such as `|Asmall|' which are |
| 1545 |
not found in the roman font, the default substitutions in |
| 1546 |
|latin.mtx| are eventually used to approximate fake small caps |
| 1547 |
glyphs by scaling and letterspacing. The outcome is just an |
| 1548 |
approximation for a small caps font, but it is better than nothing. |
| 1549 |
|
| 1550 |
For a small number of typefaces, the standard fonts are complemented |
| 1551 |
by an expert collection, which usually includes two sets of fonts. |
| 1552 |
First, for each standard font there is a corresponding expert font |
| 1553 |
containing additional glyphs such as extra ligatures and symbols, |
| 1554 |
oldstyle digits and small capital letters. For Adobe expert fonts |
| 1555 |
this set is sufficient to build a complete small caps font from the |
| 1556 |
standard and expert glyphs. Furthermore, the expert collection |
| 1557 |
usually also contains a number of real small caps font corresponding |
| 1558 |
to the roman fonts and some OsF fonts corresponding to the italic |
| 1559 |
fonts. If these fonts are available, there are several options how |
| 1560 |
to install small caps fonts. |
| 1561 |
|
| 1562 |
By default, |\latinfamily| first tries to find a real small caps |
| 1563 |
font. If it is found, it is installed using the default encoding |
| 1564 |
files and metric files, just like any roman or slanted font. |
| 1565 |
However, once |\latinfamily| has taken this choice, it will fail to |
| 1566 |
find a corresponding expert font, since it is actually looking for |
| 1567 |
an expert font in small caps shape which doesn't exist. (In fact, |
| 1568 |
it would be an error to substitute an expert font in normal shape.) |
| 1569 |
The outcome will be a virtual font based only on glyphs from the |
| 1570 |
real small caps raw font, which implies ending up with oldstyle |
| 1571 |
digits as the default set of digits, but allows to inherit the |
| 1572 |
kerning information of the real small caps font. |
| 1573 |
|
| 1574 |
Another option for an expertized installation would be to make the |
| 1575 |
real small caps fonts unavailable, so that |\latinfamily| will |
| 1576 |
attempt to fake a small caps font using glyphs from the standard and |
| 1577 |
expert fonts in normal shape. This means that |\encoding_shape| is |
| 1578 |
again set to `|c|', so that |OT1c.etx| and |T1c.etx| are used, but |
| 1579 |
this time a glyph named `|Asmall|' does exist in the expert font and |
| 1580 |
will be used instead of faked one generated by scaling. The outcome |
| 1581 |
will be a font based on normal and small caps glyphs from the |
| 1582 |
standard and expert fonts. The oldstyle digits will only be used if |
| 1583 |
they are called for, otherwise the default digits from the roman |
| 1584 |
font are used. The only drawback of this approach is that the |
| 1585 |
kerning around small capital letters will be based on the scaled |
| 1586 |
kern amounts of the capital letters rather than on the kern pairs |
| 1587 |
from the real small caps font. |
| 1588 |
|
| 1589 |
Finally, the most promising approach of all these options would be |
| 1590 |
to combine the glyphs from standard and expert fonts with kern pairs |
| 1591 |
from the real small caps fonts. The current version of |\latinfamily| |
| 1592 |
does not implement this, but it would be a worthwhile approach, and |
| 1593 |
advanced \package{fontinst} users are encouraged to attempt it. The |
| 1594 |
file \texttt{csckrn2x.tex} (a variant of \texttt{csc2x.tex}, which is |
| 1595 |
mentioned in Subsection~\ref{Ssec:Des:Reglyph}) should come in handy |
| 1596 |
for this. |
| 1597 |
|
| 1598 |
|
| 1599 |
\subsection{\package{fontinst} variables} |
| 1600 |
|
| 1601 |
The following is a list of the \package{fontinst} variables that are |
| 1602 |
accessible for the user through the |\set|\textellipsis, |
| 1603 |
|\reset|\textellipsis, |\unset|\textellipsis, etc.\ commands. You may |
| 1604 |
of course set or use other variables in the MTX and ETX files you |
| 1605 |
write yourself, as does for example the standard MTX file |
| 1606 |
\texttt{latin.mtx}, but all variables that \package{fontinst} commands |
| 1607 |
implicitly use or set are listed below. |
| 1608 |
|
| 1609 |
\begin{list}{}{% |
| 1610 |
\setlength\labelwidth{0pt}% |
| 1611 |
\setlength\itemindent{-\leftmargin}% |
| 1612 |
\setlength\parsep{0pt} |
| 1613 |
\def\makelabel#1{\hspace\labelsep \normalfont\ttfamily #1}% |
| 1614 |
} |
| 1615 |
\item[acccapheight] (integer denoting length) |
| 1616 |
\begin{smalldes} |
| 1617 |
\item[Description] The height of accented full capitals. |
| 1618 |
\item[Set by] MTX files. |
| 1619 |
\item[Used by] Some ETX and MTX files. |
| 1620 |
\end{smalldes} |
| 1621 |
\item[address] (string) |
| 1622 |
\begin{smalldes} |
| 1623 |
\item[Description] Snailmail address put in \BibTeX-style file |
| 1624 |
header of automatically generated ENC files. No |
| 1625 |
\texttt{address} field is written unless the \texttt{address} |
| 1626 |
string is set. Quotes are not automatically inserted around |
| 1627 |
the \texttt{address} string. |
| 1628 |
\item[Set by] ETX files. |
| 1629 |
\item[Used by] The ETX-to-ENC converter. |
| 1630 |
\end{smalldes} |
| 1631 |
\item[afm-name] (string) |
| 1632 |
\begin{smalldes} |
| 1633 |
\item[Description] Name of source font. Internal variable. |
| 1634 |
\item[Set by] |\from|\dots\ commands. |
| 1635 |
\item[Used by] The |\transform|\-|font|, |\install|\-|font|, |
| 1636 |
|\install|\-|raw|\-|font|, and |\reglyph|\-|font| commands. |
| 1637 |
\end{smalldes} |
| 1638 |
\item[ascender] (integer denoting length) |
| 1639 |
\begin{smalldes} |
| 1640 |
\item[Description] The ascender height of the font. |
| 1641 |
\item[Set by] MTX files. The AFM-to-MTX converter usually writes |
| 1642 |
|\setint| commands for this integer. |
| 1643 |
\item[Used by] Some MTX and ETX files. |
| 1644 |
\end{smalldes} |
| 1645 |
\item[author] (string) |
| 1646 |
\begin{smalldes} |
| 1647 |
\item[Description] Author name(s) put in \BibTeX-style file |
| 1648 |
header of automatically generated ENC files. See the macro |
| 1649 |
|\ref_to_sourcefile| for more details. |
| 1650 |
\item[Set by] ETX files. |
| 1651 |
\item[Used by] The ETX-to-ENC converter. When not set, the |
| 1652 |
value \texttt{"See file }\meta{etx name}\texttt{"} is used |
| 1653 |
instead. |
| 1654 |
\end{smalldes} |
| 1655 |
\item[\cs{autoinstallfamily}] (command) |
| 1656 |
\begin{smalldes} |
| 1657 |
\item[Description] Command called by the font installation |
| 1658 |
commands, as |
| 1659 |
\begin{quote} |
| 1660 |
|\autoinstallfamily|\marg{encoding}\marg{family} |
| 1661 |
\end{quote} |
| 1662 |
when they are asked to install a font with a combination of |
| 1663 |
\meta{encoding} and \meta{family} that has not been seen |
| 1664 |
before (there was no explicit |\installfamily|). |
| 1665 |
\item[Set by] Explicit commands. Defaults to calling |
| 1666 |
|\installfamily|. |
| 1667 |
\item[Used by] Font installation commands. |
| 1668 |
\end{smalldes} |
| 1669 |
\item[axisheight] (integer denoting length) |
| 1670 |
\begin{smalldes} |
| 1671 |
\item[Description] Math formula parameter $\sigma\sb{22}$. |
| 1672 |
\item[Set by] MTX files. |
| 1673 |
\item[Used by] Some ETX and MTX files. |
| 1674 |
\end{smalldes} |
| 1675 |
\item[baselineskip] (integer denoting length) |
| 1676 |
\begin{smalldes} |
| 1677 |
\item[Description] |
| 1678 |
The font designer's recommendation for natural length of the |
| 1679 |
\TeX\ parameter |\baselineskip|. |
| 1680 |
\item[Set by] MTX files. |
| 1681 |
\item[Used by] Some ETX and MTX files. |
| 1682 |
\end{smalldes} |
| 1683 |
\item[bigopspacing1] (integer denoting length) |
| 1684 |
\begin{smalldes} |
| 1685 |
\item[Description] Math formula parameter $\xi\sb{9}$. |
| 1686 |
\item[Set by] MTX files. |
| 1687 |
\item[Used by] Some ETX and MTX files. |
| 1688 |
\end{smalldes} |
| 1689 |
\item[bigopspacing2] (integer denoting length) |
| 1690 |
\begin{smalldes} |
| 1691 |
\item[Description] Math formula parameter $\xi\sb{10}$. |
| 1692 |
\item[Set by] MTX files. |
| 1693 |
\item[Used by] Some ETX and MTX files. |
| 1694 |
\end{smalldes} |
| 1695 |
\item[bigopspacing3] (integer denoting length) |
| 1696 |
\begin{smalldes} |
| 1697 |
\item[Description] Math formula parameter $\xi\sb{11}$. |
| 1698 |
\item[Set by] MTX files. |
| 1699 |
\item[Used by] Some ETX and MTX files. |
| 1700 |
\end{smalldes} |
| 1701 |
\item[bigopspacing4] (integer denoting length) |
| 1702 |
\begin{smalldes} |
| 1703 |
\item[Description] Math formula parameter $\xi\sb{12}$. |
| 1704 |
\item[Set by] MTX files. |
| 1705 |
\item[Used by] Some ETX and MTX files. |
| 1706 |
\end{smalldes} |
| 1707 |
\item[bigopspacing5] (integer denoting length) |
| 1708 |
\begin{smalldes} |
| 1709 |
\item[Description] Math formula parameter $\xi\sb{13}$. |
| 1710 |
\item[Set by] MTX files. |
| 1711 |
\item[Used by] Some ETX and MTX files. |
| 1712 |
\end{smalldes} |
| 1713 |
\item[capheight] (integer denoting length) |
| 1714 |
\begin{smalldes} |
| 1715 |
\item[Description] The height of the font's full capitals. |
| 1716 |
\item[Set by] MTX files. The AFM-to-MTX converter usually writes |
| 1717 |
|\setint| commands for this variable. |
| 1718 |
\item[Used by] Some MTX and ETX files. |
| 1719 |
\end{smalldes} |
| 1720 |
\item[cmapname] (string) |
| 1721 |
\begin{smalldes} |
| 1722 |
\item[Description] The name given to the CMap generated from |
| 1723 |
an ETX file. |
| 1724 |
\item[Set by] ETX files. |
| 1725 |
\item[Used by] The ETX-to-CMap converter. When not set, the |
| 1726 |
value |fontinst-|\nolinebreak[1]\meta{cmap file name} is |
| 1727 |
used instead. |
| 1728 |
\end{smalldes} |
| 1729 |
\item[codingscheme] (string) |
| 1730 |
\begin{smalldes} |
| 1731 |
\item[Description] The codingscheme name. |
| 1732 |
\item[Set by] ETX files. |
| 1733 |
\item[Used by] The (V)PL writer. When not set, the |
| 1734 |
value \texttt{UNKNOWN} is used instead. |
| 1735 |
\end{smalldes} |
| 1736 |
\item[defaultrulethickness] (integer denoting length) |
| 1737 |
\begin{smalldes} |
| 1738 |
\item[Description] Math formula parameter $\xi\sb{8}$. |
| 1739 |
\item[Set by] MTX files. |
| 1740 |
\item[Used by] Some ETX and MTX files. |
| 1741 |
\end{smalldes} |
| 1742 |
\item[delim1] (integer denoting length) |
| 1743 |
\begin{smalldes} |
| 1744 |
\item[Description] Math formula parameter $\sigma\sb{20}$. |
| 1745 |
\item[Set by] MTX files. |
| 1746 |
\item[Used by] Some ETX and MTX files. |
| 1747 |
\end{smalldes} |
| 1748 |
\item[delim2] (integer denoting length) |
| 1749 |
\begin{smalldes} |
| 1750 |
\item[Description] Math formula parameter $\sigma\sb{21}$. |
| 1751 |
\item[Set by] MTX files. |
| 1752 |
\item[Used by] Some ETX and MTX files. |
| 1753 |
\end{smalldes} |
| 1754 |
\item[denom1] (integer denoting length) |
| 1755 |
\begin{smalldes} |
| 1756 |
\item[Description] Math formula parameter $\sigma\sb{11}$. |
| 1757 |
\item[Set by] MTX files. |
| 1758 |
\item[Used by] Some ETX and MTX files. |
| 1759 |
\end{smalldes} |
| 1760 |
\item[denom2] (integer denoting length) |
| 1761 |
\begin{smalldes} |
| 1762 |
\item[Description] Math formula parameter $\sigma\sb{12}$. |
| 1763 |
\item[Set by] MTX files. |
| 1764 |
\item[Used by] Some ETX and MTX files. |
| 1765 |
\end{smalldes} |
| 1766 |
\item[descender] (integer denoting length) |
| 1767 |
\begin{smalldes} |
| 1768 |
\item[Description] The depth of lower case letters with descenders. |
| 1769 |
\item[Set by] MTX files. |
| 1770 |
\item[Used by] Some ETX and MTX files. |
| 1771 |
\end{smalldes} |
| 1772 |
\item[descender_neg] (integer denoting length) |
| 1773 |
\begin{smalldes} |
| 1774 |
\item[Description] The vertical position of the descender line |
| 1775 |
of the font, i.e., the negative of the font's descender depth. |
| 1776 |
\item[Set by] MTX files. The AFM-to-MTX converter usually writes |
| 1777 |
|\setint| commands for this variable. |
| 1778 |
\item[Used by] Some MTX and ETX files. |
| 1779 |
\end{smalldes} |
| 1780 |
\item[designsize] (dimension) |
| 1781 |
\begin{smalldes} |
| 1782 |
\item[Description] The design size of the font. |
| 1783 |
\item[Set by] MTX files. The (V)PL-to-MTX converter usually writes |
| 1784 |
|\setdim| commands for this variable. |
| 1785 |
\item[Used by] The (V)PL writer. The design size defaults to |
| 1786 |
$10\,\mathrm{pt}$ if this variable is not set. |
| 1787 |
\item[Note] The value of this variable has no effect on how |
| 1788 |
the font is declared to \LaTeX. |
| 1789 |
\end{smalldes} |
| 1790 |
\item[designunits] (dimension denoting a real number) |
| 1791 |
\begin{smalldes} |
| 1792 |
\item[Description] The design size of a font expressed in the |
| 1793 |
design unit used in a (V)PL file. |
| 1794 |
\item[Set by] MTX files. The (V)PL-to-MTX converter usually writes |
| 1795 |
|\setdim| commands for this variable. |
| 1796 |
\item[Used by] Nothing. If this variable is set, but to any |
| 1797 |
value other than $1\,\mathrm{pt}$, then some metrics are most |
| 1798 |
likely wrong. |
| 1799 |
\end{smalldes} |
| 1800 |
\item[digitwidth] (integer denoting length) |
| 1801 |
\begin{smalldes} |
| 1802 |
\item[Description] The median width of the digits in the font. |
| 1803 |
\item[Set by] MTX files. |
| 1804 |
\item[Used by] Some ETX and MTX files. |
| 1805 |
\end{smalldes} |
| 1806 |
\item[email] (string) |
| 1807 |
\begin{smalldes} |
| 1808 |
\item[Description] Email address put in \BibTeX-style file |
| 1809 |
header of automatically generated ENC files. See the macro |
| 1810 |
|\ref_to_sourcefile| for more details. |
| 1811 |
\item[Set by] ETX files. |
| 1812 |
\item[Used by] The ETX-to-ENC converter. When not set, the |
| 1813 |
value \texttt{"See file }\meta{etx name}\texttt{"} is used |
| 1814 |
instead. |
| 1815 |
\end{smalldes} |
| 1816 |
\item[encodingname] (string) |
| 1817 |
\begin{smalldes} |
| 1818 |
\item[Description] The name by which the encoding in question is |
| 1819 |
made known to a Postscript interpreter. |
| 1820 |
\item[Set by] ETX files. |
| 1821 |
\item[Used by] The ETX-to-ENC converter. When not set, the |
| 1822 |
value |fontinst-|\nolinebreak[1]|autoenc-|\nolinebreak[1]% |
| 1823 |
\meta{etx name} is used instead. |
| 1824 |
\end{smalldes} |
| 1825 |
\item[etx-name] (string) |
| 1826 |
\begin{smalldes} |
| 1827 |
\item[Description] Name of ETX file. Internal variable in |
| 1828 |
|\transform|\-|font|. |
| 1829 |
\item[Set by] The |\reencodefont| command. |
| 1830 |
\item[Used by] The |\mtxtomtx| command. |
| 1831 |
\end{smalldes} |
| 1832 |
\item[extraspace] (integer denoting length) |
| 1833 |
\begin{smalldes} |
| 1834 |
\item[Description] |
| 1835 |
The natural width of extra interword glue at the end of a |
| 1836 |
sentence. |
| 1837 |
\item[Set by] MTX files. |
| 1838 |
\item[Used by] Some ETX and MTX files. |
| 1839 |
\end{smalldes} |
| 1840 |
\item[fontdimen($n$)] (integer) |
| 1841 |
\begin{smalldes} |
| 1842 |
\item[Description] Family of semi-internal variables that store |
| 1843 |
the values to use for font dimension $n$. It is preferred |
| 1844 |
that the newer |\set|\-|font|\-|dimen| interface is used for |
| 1845 |
setting these values. |
| 1846 |
\item[Set by] ETX files. |
| 1847 |
\item[Used by] The (V)PL writer. |
| 1848 |
\end{smalldes} |
| 1849 |
\item[\cs{iftokeep}] (macro) |
| 1850 |
\begin{smalldes} |
| 1851 |
\item[Description] |\iftokeep|\,\#1\,|\then|, where \#1 will |
| 1852 |
be a \meta{number}, behaves like a switch and decides whether |
| 1853 |
a glyph is kept or not while reglyphing. |
| 1854 |
\item[Set by] Explicit commands. Defaults to |
| 1855 |
$$ |
| 1856 |
\mbox{\cs{iftokeep}\,\#1\,\cs{then}} \mapsto |
| 1857 |
\mbox{\cs{ifnum}\,\texttt{-1<}\#1} |
| 1858 |
$$ |
| 1859 |
\item[Used by] The |\reglyphfont| command. |
| 1860 |
\end{smalldes} |
| 1861 |
\item[interword] (integer denoting length) |
| 1862 |
\begin{smalldes} |
| 1863 |
\item[Description] The natural width of interword glue (spaces). |
| 1864 |
\item[Set by] MTX files. |
| 1865 |
\item[Used by] Some ETX and MTX files. |
| 1866 |
\end{smalldes} |
| 1867 |
\item[italicslant] (integer denoting factor) |
| 1868 |
\begin{smalldes} |
| 1869 |
\item[Description] The italic slant of a font. |
| 1870 |
\item[Set by] MTX files generated from AFM or (V)PL files. MTX |
| 1871 |
files generated by |\transformfont|. Locally in the AFM-to-MTX |
| 1872 |
converter for possible use in |\uprightitalcorr| or |
| 1873 |
|\slanteditalcorr|. |
| 1874 |
\item[Used by] MTX files (\texttt{latin.mtx} and the like). ETX |
| 1875 |
files (for determining \texttt{fontdimen(1)}). |
| 1876 |
\end{smalldes} |
| 1877 |
\item[killweight] (integer) |
| 1878 |
\begin{smalldes} |
| 1879 |
\item[Description] Weight for glyphs that are killed. |
| 1880 |
\item[Set by] Explicit commands. Defaults to $-10$ if not set. |
| 1881 |
\item[Used by] The |\kill|\-|glyph| command; indirectly |
| 1882 |
the |\reglyphfont| command. |
| 1883 |
\end{smalldes} |
| 1884 |
\item[letterspacing] (integer denoting length) |
| 1885 |
\begin{smalldes} |
| 1886 |
\item[Description] Extra width added to all glyphs of a font. |
| 1887 |
\item[Set by] ETX or MTX files. |
| 1888 |
\item[Used by] The (V)PL writer. Defaults to $0$ if not set. |
| 1889 |
\end{smalldes} |
| 1890 |
\item[maxdepth] (integer denoting length) |
| 1891 |
\begin{smalldes} |
| 1892 |
\item[Description] The maximal depth over all slots in the font. |
| 1893 |
\item[Set by] MTX files. |
| 1894 |
\item[Used by] Some ETX and MTX files. |
| 1895 |
\end{smalldes} |
| 1896 |
\item[maxdepth_neg] (integer denoting length) |
| 1897 |
\begin{smalldes} |
| 1898 |
\item[Description] The negative of the maximal depth of a glyph in |
| 1899 |
the font. |
| 1900 |
\item[Set by] MTX files. The AFM-to-MTX converter usually writes |
| 1901 |
|\setint| commands for this variable. |
| 1902 |
\item[Used by] Some ETX and MTX files. |
| 1903 |
\end{smalldes} |
| 1904 |
\item[maxheight] (integer denoting length) |
| 1905 |
\begin{smalldes} |
| 1906 |
\item[Description] The maximal height of a glyph in the font. |
| 1907 |
\item[Set by] MTX files. The AFM-to-MTX converter usually writes |
| 1908 |
|\setint| commands for this variable. |
| 1909 |
\item[Used by] Some ETX and MTX files. |
| 1910 |
\end{smalldes} |
| 1911 |
\item[minimumkern] (integer denoting length) |
| 1912 |
\begin{smalldes} |
| 1913 |
\item[Description] Kerns whose size in absolute value is less |
| 1914 |
than or equal to this variable are ignored. |
| 1915 |
\item[Set by] \package{fontinst} command files or MTX files. |
| 1916 |
\item[Used by] The AFM-to-MTX converter and the (V)PL file |
| 1917 |
generator. When not set, the value $0$ is used instead. |
| 1918 |
\end{smalldes} |
| 1919 |
\item[monowidth] (flag integer) |
| 1920 |
\begin{smalldes} |
| 1921 |
\item[Description] Set if this font is monowidth, unset otherwise. |
| 1922 |
\item[Set by] MTX files. The AFM-to-MTX converter writes a |
| 1923 |
|\setint| command for this variable if the AFM specifies |
| 1924 |
\texttt{IsFixedPitch true}. |
| 1925 |
\item[Used by] Some MTX files (\texttt{latin.mtx} and the like), |
| 1926 |
ETX files. |
| 1927 |
\end{smalldes} |
| 1928 |
\item[num1] (integer denoting length) |
| 1929 |
\begin{smalldes} |
| 1930 |
\item[Description] Math formula parameter $\sigma\sb{8}$. |
| 1931 |
\item[Set by] MTX files. |
| 1932 |
\item[Used by] Some ETX and MTX files. |
| 1933 |
\end{smalldes} |
| 1934 |
\item[num2] (integer denoting length) |
| 1935 |
\begin{smalldes} |
| 1936 |
\item[Description] Math formula parameter $\sigma\sb{9}$. |
| 1937 |
\item[Set by] MTX files. |
| 1938 |
\item[Used by] Some ETX and MTX files. |
| 1939 |
\end{smalldes} |
| 1940 |
\item[num3] (integer denoting length) |
| 1941 |
\begin{smalldes} |
| 1942 |
\item[Description] Math formula parameter $\sigma\sb{10}$. |
| 1943 |
\item[Set by] MTX files. |
| 1944 |
\item[Used by] Some ETX and MTX files. |
| 1945 |
\end{smalldes} |
| 1946 |
\item[quad] (integer denoting length) |
| 1947 |
\begin{smalldes} |
| 1948 |
\item[Description] |
| 1949 |
The quad width of the font, normally approximately equal to |
| 1950 |
the font size and\slash or the width of an `M'. |
| 1951 |
\item[Set by] MTX files. |
| 1952 |
\item[Used by] Some ETX and MTX files. |
| 1953 |
\end{smalldes} |
| 1954 |
\item[PSfontsuffix] (string) |
| 1955 |
\begin{smalldes} |
| 1956 |
\item[Description] Suffix added to font names to form name of |
| 1957 |
file to download to include font. |
| 1958 |
\item[Set by] Explicit commands in \textsf{finstmsc} command |
| 1959 |
files. Defaults to `\texttt{.pfa}'. |
| 1960 |
\item[Used by] The map file fragments writer. |
| 1961 |
\end{smalldes} |
| 1962 |
\item[rawscale] (integer denoting factor) |
| 1963 |
\begin{smalldes} |
| 1964 |
\item[Description] Scaling factor applied to raw glyphs. |
| 1965 |
\item[Set by] The |\installfont| command (\texttt{scaled} |
| 1966 |
clauses in argument \#2). Unset for metric files listed |
| 1967 |
without a \texttt{scaled} clause. |
| 1968 |
\item[Used by] The |\set|\-|raw|\-|glyph|, |
| 1969 |
|\set|\-|not|\-|glyph|, |\set|\-|scaled|\-|raw|\-|glyph|, |
| 1970 |
|\set|\-|scaled|\-|not|\-|glyph|, |\set|\-|kern|, and |
| 1971 |
|\reset|\-|kern| commands. |
| 1972 |
\end{smalldes} |
| 1973 |
\item[renameweight] (integer) |
| 1974 |
\begin{smalldes} |
| 1975 |
\item[Description] Weight for glyphs that are renamed. |
| 1976 |
\item[Set by] Explicit commands. Defaults to $1$ if not set. |
| 1977 |
\item[Used by] The |\rename|\-|glyph| command; indirectly |
| 1978 |
the |\reglyphfont| command. |
| 1979 |
\end{smalldes} |
| 1980 |
\item[requireglyphs] (flag integer) |
| 1981 |
\begin{smalldes} |
| 1982 |
\item[Description] Set if warnings are to be generated for |
| 1983 |
glyphs listed in ETX files but not present in the glyph |
| 1984 |
base. |
| 1985 |
\item[Set by] Explicit commands. By defaults not set. |
| 1986 |
\item[Used by] The (V)PL file generator. |
| 1987 |
\end{smalldes} |
| 1988 |
\item[rightboundary] (string) |
| 1989 |
\begin{smalldes} |
| 1990 |
\item[Description] The name of a glyph with the property that |
| 1991 |
kerns on the left may be intended as right word boundary kerns. |
| 1992 |
\item[Set by] MTX files. The (V)PL-to-MTX converter can write |
| 1993 |
|\setstr| commands for this variable. |
| 1994 |
\item[Used by] Some MTX files. |
| 1995 |
\end{smalldes} |
| 1996 |
\item[shrinkword] (integer denoting length) |
| 1997 |
\begin{smalldes} |
| 1998 |
\item[Description] |
| 1999 |
The (finite) shrink component of interword glue. |
| 2000 |
\item[Set by] MTX files. |
| 2001 |
\item[Used by] Some ETX and MTX files. |
| 2002 |
\end{smalldes} |
| 2003 |
\item[slant-scale] (integer denoting factor) |
| 2004 |
\begin{smalldes} |
| 2005 |
\item[Description] Factor to slant by. |
| 2006 |
Internal variable in |\transform|\-|font|. |
| 2007 |
\item[Set by] The |\slant|\-|font|, |\xscale|\-|font|, and |
| 2008 |
|\scale|\-|font| commands. |
| 2009 |
\item[Used by] The |\mtxtomtx| command. |
| 2010 |
\end{smalldes} |
| 2011 |
\item[\cs{SlantAmount}] (macro expanding to an integer expression) |
| 2012 |
\begin{smalldes} |
| 2013 |
\item[Description] Slant factor used for faking oblique shape. |
| 2014 |
\item[Set by] Explicit commands. Defaults to \texttt{167}. |
| 2015 |
\item[Used by] The |\latinfamily| command. |
| 2016 |
\end{smalldes} |
| 2017 |
\item[\cs{slanteditalcorr}] |
| 2018 |
(macro expanding to an integer expression) |
| 2019 |
\begin{smalldes} |
| 2020 |
\item[Description] The integer expression used to calculate a |
| 2021 |
guess for the italic correction of glyphs in a font with |
| 2022 |
positive slant. It has the syntax |
| 2023 |
\begin{quote} |
| 2024 |
\cs{slanteditalcorr}\marg{width}\marg{left}\marg{right}^^A |
| 2025 |
\marg{bottom}\marg{top} |
| 2026 |
\end{quote} |
| 2027 |
where \meta{width} is the glyph's advance width, and the |
| 2028 |
remaining arguments are coordinates of sides of the glyph's |
| 2029 |
bounding box. The \texttt{italicslant} integer provides the |
| 2030 |
italic slant of the font. |
| 2031 |
\item[Set by] Explicit commands in \textsf{fontinst} command |
| 2032 |
files. Defaults to |
| 2033 |
$$ |
| 2034 |
\max\{0, \mathit{right}-\mathit{width}\}. |
| 2035 |
$$ |
| 2036 |
\item[Used by] The AFM-to-MTX converter. |
| 2037 |
\end{smalldes} |
| 2038 |
\item[stretchword] (integer denoting length) |
| 2039 |
\begin{smalldes} |
| 2040 |
\item[Description] |
| 2041 |
The (finite) stretch component of interword glue. |
| 2042 |
\item[Set by] MTX files. |
| 2043 |
\item[Used by] Some ETX and MTX files. |
| 2044 |
\end{smalldes} |
| 2045 |
\item[sub1] (integer denoting length) |
| 2046 |
\begin{smalldes} |
| 2047 |
\item[Description] Math formula parameter $\sigma\sb{16}$. |
| 2048 |
\item[Set by] MTX files. |
| 2049 |
\item[Used by] Some ETX and MTX files. |
| 2050 |
\end{smalldes} |
| 2051 |
\item[sub2] (integer denoting length) |
| 2052 |
\begin{smalldes} |
| 2053 |
\item[Description] Math formula parameter $\sigma\sb{17}$. |
| 2054 |
\item[Set by] MTX files. |
| 2055 |
\item[Used by] Some ETX and MTX files. |
| 2056 |
\end{smalldes} |
| 2057 |
\item[subdrop] (integer denoting length) |
| 2058 |
\begin{smalldes} |
| 2059 |
\item[Description] Math formula parameter $\sigma\sb{19}$. |
| 2060 |
\item[Set by] MTX files. |
| 2061 |
\item[Used by] Some ETX and MTX files. |
| 2062 |
\end{smalldes} |
| 2063 |
\item[sup1] (integer denoting length) |
| 2064 |
\begin{smalldes} |
| 2065 |
\item[Description] Math formula parameter $\sigma\sb{13}$. |
| 2066 |
\item[Set by] MTX files. |
| 2067 |
\item[Used by] Some ETX and MTX files. |
| 2068 |
\end{smalldes} |
| 2069 |
\item[sup2] (integer denoting length) |
| 2070 |
\begin{smalldes} |
| 2071 |
\item[Description] Math formula parameter $\sigma\sb{14}$. |
| 2072 |
\item[Set by] MTX files. |
| 2073 |
\item[Used by] Some ETX and MTX files. |
| 2074 |
\end{smalldes} |
| 2075 |
\item[sup3] (integer denoting length) |
| 2076 |
\begin{smalldes} |
| 2077 |
\item[Description] Math formula parameter $\sigma\sb{15}$. |
| 2078 |
\item[Set by] MTX files. |
| 2079 |
\item[Used by] Some ETX and MTX files. |
| 2080 |
\end{smalldes} |
| 2081 |
\item[supdrop] (integer denoting length) |
| 2082 |
\begin{smalldes} |
| 2083 |
\item[Description] Math formula parameter $\sigma\sb{18}$. |
| 2084 |
\item[Set by] MTX files. |
| 2085 |
\item[Used by] Some ETX and MTX files. |
| 2086 |
\end{smalldes} |
| 2087 |
\item[TFMfileprefix] (string) |
| 2088 |
\begin{smalldes} |
| 2089 |
\item[Description] Prefix (typically a path) added to names of |
| 2090 |
TFM files. |
| 2091 |
\item[Set by] Explicit commands in \textsf{finstmsc} command |
| 2092 |
files. By default not set, which is equivalent to being empty. |
| 2093 |
\item[Used by] The \textsf{PLtoTF} ``map file fragments writer''. |
| 2094 |
\end{smalldes} |
| 2095 |
\item[underlinethickness] (integer denoting length) |
| 2096 |
\begin{smalldes} |
| 2097 |
\item[Description] The recommended thickness of an underlining |
| 2098 |
rule. |
| 2099 |
\item[Set by] MTX files. The AFM-to-MTX converter usually writes |
| 2100 |
|\setint| commands for this variable. |
| 2101 |
\item[Used by] Some MTX files (\texttt{latin.mtx} and the like). |
| 2102 |
\end{smalldes} |
| 2103 |
\item[\cs{uprightitalcorr}] |
| 2104 |
(macro expanding to an integer expression) |
| 2105 |
\begin{smalldes} |
| 2106 |
\item[Description] The integer expression used to calculate a |
| 2107 |
guess for the italic correction of glyphs in a font with |
| 2108 |
non-positive slant. It has the syntax |
| 2109 |
\begin{quote} |
| 2110 |
\cs{uprightitalcorr}\marg{width}\marg{left}\marg{right}^^A |
| 2111 |
\marg{bottom}\marg{top} |
| 2112 |
\end{quote} |
| 2113 |
where \meta{width} is the glyph's advance width, and the |
| 2114 |
remaining arguments are coordinates of sides of the glyph's |
| 2115 |
bounding box. The \texttt{italicslant} integer provides the |
| 2116 |
italic slant of the font. |
| 2117 |
\item[Set by] Explicit commands in \textsf{fontinst} command |
| 2118 |
files. Defaults to $0$. |
| 2119 |
\item[Used by] The AFM-to-MTX converter. |
| 2120 |
\end{smalldes} |
| 2121 |
\item[version] (string) |
| 2122 |
\begin{smalldes} |
| 2123 |
\item[Description] Version number put in \BibTeX-style file |
| 2124 |
header of automatically generated ENC files. See the macro |
| 2125 |
|\ref_to_sourcefile| for more details. |
| 2126 |
\item[Set by] ETX files. |
| 2127 |
\item[Used by] The ETX-to-ENC converter. When not set, the |
| 2128 |
value \texttt{"See file }\meta{etx name}\texttt{"} is used |
| 2129 |
instead. |
| 2130 |
\end{smalldes} |
| 2131 |
\item[verticalstem] (integer denoting length) |
| 2132 |
\begin{smalldes} |
| 2133 |
\item[Description] The dominant width of vertical stems |
| 2134 |
(usually the width of stems of lower case letters). |
| 2135 |
\item[Set by] MTX files. The AFM-to-MTX converter writes |
| 2136 |
|\setint| commands for this variable if the AFM file specifies |
| 2137 |
\texttt{StdVW}. |
| 2138 |
\item[Used by] Currently nothing. |
| 2139 |
\end{smalldes} |
| 2140 |
\item[\texttt{warningspecials}] (switch) |
| 2141 |
\begin{smalldes} |
| 2142 |
\item[Description] Controls whether |\glyphwarning| commands |
| 2143 |
will generate VPL \texttt{SPECIAL}s. Defaults to `true'. |
| 2144 |
\item[Set by] Explicit commands (|\warningspecialstrue| and |
| 2145 |
|\warningspecialsfalse|). |
| 2146 |
\item[Used by] The (V)PL file generator. |
| 2147 |
\end{smalldes} |
| 2148 |
\item[x-scale] (integer denoting factor) |
| 2149 |
\begin{smalldes} |
| 2150 |
\item[Description] Horizontal scaling factor. |
| 2151 |
Internal variable in |\transform|\-|font|. |
| 2152 |
\item[Set by] The |\xscale|\-|font| and |\scale|\-|font| commands. |
| 2153 |
\item[Used by] The |\mtxtomtx| command. |
| 2154 |
\end{smalldes} |
| 2155 |
\item[xheight] (integer denoting length) |
| 2156 |
\begin{smalldes} |
| 2157 |
\item[Description] The x-height of the font. |
| 2158 |
\item[Set by] MTX files. The AFM-to-MTX and (V)PL-to-MTX |
| 2159 |
converters usually write |\setint| commands for this variable. |
| 2160 |
\item[Used by] MTX files, and ETX files (for determining |
| 2161 |
\texttt{fontdimen(5)}). |
| 2162 |
\end{smalldes} |
| 2163 |
\item[y-scale] (integer denoting factor) |
| 2164 |
\begin{smalldes} |
| 2165 |
\item[Description] Vertical scaling factor. |
| 2166 |
Internal variable in |\transform|\-|font|. |
| 2167 |
\item[Set by] The |\yscale|\-|font| and |\scale|\-|font| commands. |
| 2168 |
\item[Used by] The |\mtxtomtx| command. |
| 2169 |
\end{smalldes} |
| 2170 |
\item[\meta{\rmfamily glyph}-spacing] (integer denoting length) |
| 2171 |
\begin{smalldes} |
| 2172 |
\item[Description] Glyph-specific override for |
| 2173 |
\texttt{letterspacing}; extra width added to the glyph |
| 2174 |
\meta{glyph} as part of the process of writing a VPL |
| 2175 |
file. |
| 2176 |
\item[Set by] ETX or MTX files. |
| 2177 |
\item[Used by] The (V)PL writer. Defaults to $0$ if not set. |
| 2178 |
\end{smalldes} |
| 2179 |
\end{list} |
| 2180 |
Besides these, the |\latinfamily| command provides a whole range of |
| 2181 |
parameters that are often used somewhat like variables. That subject |
| 2182 |
does however deserve to be treated separately. |
| 2183 |
|
| 2184 |
|
| 2185 |
\section{\package{fontdoc} package overview} |
| 2186 |
|
| 2187 |
The purpose of the \package{fontdoc} package is to support |
| 2188 |
typesetting of \texttt{.etx} and \texttt{.mtx} files intended |
| 2189 |
for use with \package{fontinst}. |
| 2190 |
The typical format of these files looks something like this: |
| 2191 |
\begin{quote} |
| 2192 |
|\relax|\\ |
| 2193 |
|\documentclass[twocolumn]{article}|\\ |
| 2194 |
|\usepackage{fontdoc}|\\[0.5\baselineskip] |
| 2195 |
|\begin{document}|\\ |
| 2196 |
{}~~\textit{\LaTeX\ commands}\\ |
| 2197 |
|\encoding| or |\metrics| \\ |
| 2198 |
{}~~\textit{\package{fontinst} commands}\\ |
| 2199 |
|\endencoding| or |\endmetrics|\\ |
| 2200 |
{}~~\textit{\LaTeX\ commands}\\ |
| 2201 |
|\end{document}| |
| 2202 |
\end{quote} |
| 2203 |
To make it work, \package{fontdoc} has to define all the user-level |
| 2204 |
\package{fontinst} commands in terms of typesetting instructions. This |
| 2205 |
goal is currently only partially achieved, but the percentage of |
| 2206 |
\package{fontinst} commands covered by \package{fontdoc} is still |
| 2207 |
fairly large, so it is our impression that problems with commands not |
| 2208 |
covered occur only very rarely. |
| 2209 |
|
| 2210 |
|
| 2211 |
\subsection{Some \package{fontdoc} commands that \package{fontinst} |
| 2212 |
doesn't know} |
| 2213 |
|
| 2214 |
Some of the commands defined by \package{fontdoc} are not defined by |
| 2215 |
\package{fontinst} because they have no meaning in that context. |
| 2216 |
Most of these commands are lower-level commands that are used in the |
| 2217 |
implementations of commands common to \package{fontinst} and |
| 2218 |
\package{fontdoc}, but a few are simply only meant to be used in the |
| 2219 |
parts of ETX and MTX files that \package{fontinst} never executes. |
| 2220 |
|
| 2221 |
With v\,1.916 the mechanism for formatting integer expressions changed |
| 2222 |
dramatically. The new base command to use is |
| 2223 |
\DescribeMacro{\TypesetIntegerExpression}|\Typeset|\-|Integer|\-% |
| 2224 |
|Expression|, which takes as its only argument the integer expression |
| 2225 |
to format and typesets it. |\Typeset|\-|Integer|\-|Expression| expects |
| 2226 |
to be used in math mode only. A similar command is |
| 2227 |
\DescribeMacro{\TypesetStringExpression}|\Typeset|\-|String|\-% |
| 2228 |
|Expression|, which takes a string expression as argument, formats, |
| 2229 |
and typesets it. |\Typeset|\-|String|\-|Expression| can be used in any |
| 2230 |
mode. |
| 2231 |
|
| 2232 |
The \DescribeMacro{\macroparameter}|\macroparameter| command is (in |
| 2233 |
integer and string expressions) understood as a ``placeholder for a |
| 2234 |
macro parameter''. This is primarily useful in comments that describe |
| 2235 |
a user-defined macro; see \texttt{ltcmds.mtx} for examples. |
| 2236 |
|
| 2237 |
|
| 2238 |
|
| 2239 |
% \part*{Implementation} |
| 2240 |
% \addcontentsline{toc}{part}{Implementation} |
| 2241 |
|
| 2242 |
\changes{1.800}{1998/06/22}{\texttt{fontinst.sty} and |
| 2243 |
\texttt{fontdoc.sty} now generated from \texttt{fontinst.dtx}. (UV)} |
| 2244 |
\changes{1.900}{1999/02/05}{\texttt{fontinst.dtx} split into several |
| 2245 |
source files. (LH)} |
| 2246 |
\changes{1.902}{1999/04/18}{Fixed some silly markup. (LH)} |
| 2247 |
|
| 2248 |
\DocInclude{fibasics} |
| 2249 |
\DocInclude{ficommon} |
| 2250 |
\DocInclude{fimain} |
| 2251 |
\DocInclude{fitrig} |
| 2252 |
\DocInclude{ficonv} |
| 2253 |
\DocInclude{filtfam} |
| 2254 |
\DocInclude{fimapgen} |
| 2255 |
|
| 2256 |
\PrintIndex |
| 2257 |
\pagestyle{plain}\tracingmacros=2\tracingcommands=2 |
| 2258 |
\PrintChanges |
| 2259 |
\tracingcommands=0\tracingmacros=0 |
| 2260 |
|
| 2261 |
\clearpage |
| 2262 |
\appendix |
| 2263 |
\part*{Internal notes} |
| 2264 |
\addcontentsline{toc}{part}{Internal notes} |
| 2265 |
|
| 2266 |
|
| 2267 |
\section{Typographic treatment} |
| 2268 |
|
| 2269 |
\begin{itemize} |
| 2270 |
\item |
| 2271 |
I have been following \emph{The \LaTeX\ Companion} in that I have |
| 2272 |
set all names of packages and the like---\package{fontinst}, |
| 2273 |
\package{fontdoc}, \package{trig}, \package{doc}, and |
| 2274 |
\package{docstrip} (I might have forgotten some)---in sans serif |
| 2275 |
type. Actually, I have defined a command |\package| in |
| 2276 |
\texttt{fisource.sty} (or is that \package{fisource}?) which does |
| 2277 |
this, so if we decide on some other formatting, we can just change |
| 2278 |
that. /LH |
| 2279 |
\item |
| 2280 |
It seems to me that there should indeed be some space between the |
| 2281 |
`v' and the digits in a version number when it is typeset, but I |
| 2282 |
also think a full space is too much, so I have been using thin |
| 2283 |
spaces. These are unbreakable and under \LaTeX\ you can simply use |
| 2284 |
|\,| to get one (while you are not in math mode, that is). /LH |
| 2285 |
\item |
| 2286 |
While I went through (some of) the code, I came across a few |
| 2287 |
inconsistencies. \ambiguity{I have marked them out like this% |
| 2288 |
\offindex}---some boldfaced text in a paragraph and a large A |
| 2289 |
in the margin. I defined a command |\ambiguity| for doing this. /LH |
| 2290 |
\item |
| 2291 |
There is also a similar command |\question| which is intended for |
| 2292 |
situations where there isn't really an error, but something seems |
| 2293 |
like it should be taken care of in some other way. \question{The |
| 2294 |
\cs{question} command puts a question mark in the margin.% |
| 2295 |
\offindex} |
| 2296 |
\item |
| 2297 |
I also noticed that there are several \package{fontinst} commands, |
| 2298 |
not all of which are new, which are not defined in \package{fontdoc}. |
| 2299 |
{\offindex\missing{doc}{\foo}}To mark out such things, I have |
| 2300 |
written things like the one shown in the margin by this paragraph. |
| 2301 |
I defined a command |\missing| for doing this. /LH |
| 2302 |
\end{itemize} |
| 2303 |
|
| 2304 |
|
| 2305 |
\section{Planning topics} |
| 2306 |
|
| 2307 |
This section lists items in the larger design of \package{fontinst} |
| 2308 |
which need to be resolved in one way or another. Debates about these |
| 2309 |
items on the fontinst mailing list are welcome. |
| 2310 |
|
| 2311 |
|
| 2312 |
\subsection{Reorganisation of the source} |
| 2313 |
|
| 2314 |
At the moment, all the ideas suggested have been realized. |
| 2315 |
% \begin{itemize} |
| 2316 |
% \item |
| 2317 |
% How about moving the first section of \texttt{fimain.dtx} to |
| 2318 |
% \texttt{fibasics.dtx}? /LH |
| 2319 |
% \item |
| 2320 |
% How about extracting the code which has to do with file |
| 2321 |
% conversions (Sections~\ref{Sec:Conv. input}, |
| 2322 |
% \ref{Sec:Font.trans}, and Subsection~\ref{Ssec:MTX->PL}) from |
| 2323 |
% \texttt{fimain.dtx} and put it in a file of its own |
| 2324 |
% (\texttt{ficonv.dtx}, say)? /LH |
| 2325 |
% \end{itemize} |
| 2326 |
|
| 2327 |
|
| 2328 |
\subsection{Files} |
| 2329 |
|
| 2330 |
Which files should be considered temporary and placed in the location |
| 2331 |
specified with |\tempfileprefix|? Should files be explicitly be looked |
| 2332 |
for at this location or should it be assumed that fontinst users |
| 2333 |
include that location in their \TeX\ input file search path? In the |
| 2334 |
former case, \emph{which} files should be looked for in that |
| 2335 |
location? Should files be looked for in the temporary location before |
| 2336 |
they are looked for without a specified location, or should it be the |
| 2337 |
other way round? |
| 2338 |
|
| 2339 |
|
| 2340 |
|
| 2341 |
|
| 2342 |
|
| 2343 |
\section{Contributors} |
| 2344 |
|
| 2345 |
[The \package{fontinst} source has been pretty inconsistent in how |
| 2346 |
people are credited for what they have done---some appear only as |
| 2347 |
acronyms while others appear as rather striking e-mail addresses---so |
| 2348 |
I thought it best that this is shaped up a bit. My suggestion is that |
| 2349 |
we use names or acronyms in the source and move everything else here. |
| 2350 |
I also thought it could be interesting with a short description of |
| 2351 |
what each person has done and is doing, so I have started ever so |
| 2352 |
slightly on something along those lines. Feel free to add things! /LH] |
| 2353 |
|
| 2354 |
\medskip |
| 2355 |
|
| 2356 |
The following people have contributed substantial amounts of code or |
| 2357 |
documentation to \package{fontinst}. They are listed in strict |
| 2358 |
alphabetical order. |
| 2359 |
|
| 2360 |
\begin{description} |
| 2361 |
\item[Thierry Bouche] |
| 2362 |
Thierry saw to that the \texttt{T1} encoded fonts got font |
| 2363 |
dimensions comparable to the \texttt{ec} fonts. Thierry is also |
| 2364 |
the author of several papers (published in the \textit{Cahiers |
| 2365 |
GUTenberg} and \textit{TUGboat}) which deal with non-trivial |
| 2366 |
applications of \package{fontinst}, such as creating metrics for |
| 2367 |
Adobe Minion Multiple Master fonts and developing a corresponding |
| 2368 |
math font setup. |
| 2369 |
|
| 2370 |
E-mail: \texttt{[email protected]} |
| 2371 |
|
| 2372 |
\item[Lars Hellstr\"om (LH)] |
| 2373 |
Lars is responsible for most of the things in v\,1.9 that were |
| 2374 |
not there in v\,1.8. |
| 2375 |
|
| 2376 |
Lars is currently a member of the \package{fontinst} |
| 2377 |
maintenance team. He is also a Ph.D.\ in mathematics looking for |
| 2378 |
employment. |
| 2379 |
|
| 2380 |
\item[Alan Jeffrey (ASAJ)] |
| 2381 |
Alan is the original author of \package{fontinst}. He is not |
| 2382 |
currently on the development team, but he is still managing the |
| 2383 |
\package{fontinst} mailing list. |
| 2384 |
|
| 2385 |
E-mail (\package{fontinst} mailing list subscriptions):% |
| 2386 |
\nobreak\hfill\penalty0\hskip -2em plus -1fill\ \relax |
| 2387 |
\vadjust{}\nobreak\hskip 2em\relax |
| 2388 |
\texttt{[email protected]}. |
| 2389 |
|
| 2390 |
\item[Constantin Kahn (CK)] |
| 2391 |
Constantin is one (Sebastian is the other) of the original coauthors |
| 2392 |
of the current |\latinfamily| command. |
| 2393 |
% \footnote{Am I right about this? It's a bit before my time, |
| 2394 |
% I've just read \texttt{CHANGES}. /LH} |
| 2395 |
|
| 2396 |
\item[Rowland McDonnell] |
| 2397 |
Rowland rewrote Alan's old v\,1.5 documentation for |
| 2398 |
\package{fontinst} and updated it for v\,1.8. |
| 2399 |
|
| 2400 |
\item[Sebastian Rahtz (SPQR)] |
| 2401 |
Sebastian is one (Constantin is the other) of the original coauthors |
| 2402 |
of the current |\latinfamily| command. He has also contributed |
| 2403 |
numerous ETX files and made the ``unofficial'' v\,1.6 and v\,1.7, |
| 2404 |
which included the first \package{fontinst} support for making |
| 2405 |
\texttt{TS1} encoded files. |
| 2406 |
|
| 2407 |
\item[Ulrik Vieth (UV)] |
| 2408 |
Ulrik converted \texttt{fontinst.sty} to \package{doc}\slash |
| 2409 |
\package{docstrip} format, reunited Alan's v\,1.511 and |
| 2410 |
Sebastian's v\,1.7, and made the first official release of |
| 2411 |
\package{fontinst} (v\,1.8) for more than two years. |
| 2412 |
|
| 2413 |
Ulrik is currently a member of the \package{fontinst} |
| 2414 |
maintenance team. He is also involved in the Joint TUG\slash |
| 2415 |
\LaTeX~3 Project Working Group on extended math font encodings. |
| 2416 |
|
| 2417 |
\item[\textellipsis] |
| 2418 |
\end{description} |
| 2419 |
Anyone else? |
| 2420 |
|
| 2421 |
|
| 2422 |
\section{To do} |
| 2423 |
|
| 2424 |
This section is based on the \texttt{TODO} file from \package{fontinst} |
| 2425 |
v\,1.504, but a couple of new entries have been added and some have |
| 2426 |
been equipped with comments. |
| 2427 |
|
| 2428 |
\subsection{Things to do in the ``near'' future} |
| 2429 |
|
| 2430 |
\begin{itemize} |
| 2431 |
\item |
| 2432 |
Update documentation. (Lars, knowing he isn't saying anything new) |
| 2433 |
|
| 2434 |
\item |
| 2435 |
Rewrite the entire substitution mechanism from scratch! The main |
| 2436 |
problem with the current mechanism is that it only allows one |
| 2437 |
substitution per shape and one per series. One cannot substitute |
| 2438 |
the |it| shape for both the |sl| and the |ui| shapes since each |
| 2439 |
new |\substitute|(|noisy|\textbar|silent|) with |it| in the |
| 2440 |
\meta{from} argument will overwrite the setting made by the |
| 2441 |
previous; |
| 2442 |
\begin{quote} |
| 2443 |
|\substitutenoisy{ui}{it}|\\ |
| 2444 |
|\substitutesilent{sl}{it}| |
| 2445 |
\end{quote} |
| 2446 |
is effectively the same as |
| 2447 |
\begin{quote} |
| 2448 |
|\substitutesilent{sl}{it}| |
| 2449 |
\end{quote} |
| 2450 |
Another big problem is that it isn't well defined what the |
| 2451 |
substitution mechanism should do. (Lars) |
| 2452 |
|
| 2453 |
I've got a sketch for a new substitution mechanism, but I'm not |
| 2454 |
at all sure it will make it into any v\,1.9xx. /LH |
| 2455 |
(The code that was written is now in \texttt{fimain.dtx}, but |
| 2456 |
it's not included in any of the generated files.) |
| 2457 |
|
| 2458 |
An alternative to substitutions is to use explicit |
| 2459 |
|\installfontas| commands. This provides complete control. /LH |
| 2460 |
|
| 2461 |
\item |
| 2462 |
Consider removing the following unreliable fakes from |
| 2463 |
\texttt{textcomp.mtx}: |
| 2464 |
\begin{quote} |
| 2465 |
\texttt{asciiacutedbl}, \texttt{asciigravedbl}, |
| 2466 |
\texttt{bardbl}, \texttt{openbracketleft}, and |
| 2467 |
\texttt{openbracketright} |
| 2468 |
\end{quote} |
| 2469 |
and consider adding fakes for the following unavailable glyphs: |
| 2470 |
\begin{quote} |
| 2471 |
\texttt{dollaroldstyle} (use \texttt{dollar}), |
| 2472 |
\texttt{centoldstyle} (use \texttt{cent}), \texttt{lira} (use |
| 2473 |
\texttt{sterling}), and \texttt{pilcrow} (use |
| 2474 |
\texttt{paragraph}) |
| 2475 |
\end{quote} |
| 2476 |
These suggestions are of course open for debate. (Ulrik) |
| 2477 |
|
| 2478 |
\item |
| 2479 |
One thing I miss in [the typeset form of an encoding |
| 2480 |
specification] is a simple hex/octal/decimal chart showing all |
| 2481 |
the character names in their positions (and ideally even an |
| 2482 |
example of the printed character, although I know that would be |
| 2483 |
harder). (Karl Berry) |
| 2484 |
|
| 2485 |
\end{itemize} |
| 2486 |
|
| 2487 |
|
| 2488 |
\subsection{Things that probably won't be done in the near future} |
| 2489 |
|
| 2490 |
\begin{itemize} |
| 2491 |
\item |
| 2492 |
Find a way to automatically generate math fonts. (Alan) |
| 2493 |
|
| 2494 |
I doubt that this will ever be possible to do automatically. |
| 2495 |
\package{mathptm} and \package{mathptmx} are already hackish enough, |
| 2496 |
not to mention the prototype implementations for new math font |
| 2497 |
encodings. /UV |
| 2498 |
|
| 2499 |
\item |
| 2500 |
Investigate using Alternate sets. (Alan) |
| 2501 |
|
| 2502 |
AFAIK, Thierry Bouche has done some work with alternate sets |
| 2503 |
for AGaramond, ACaslon and Minion, but this implies a lot of |
| 2504 |
manual work to compose the proper calls to \package{fontinst}. /UV |
| 2505 |
|
| 2506 |
\item |
| 2507 |
Create \LaTeX\ packages? In fact, rethink the whole package |
| 2508 |
interface \textellipsis\ (Alan) |
| 2509 |
|
| 2510 |
Sebastian's Perl front-end to \package{fontinst} does create trivial |
| 2511 |
\LaTeX\ packages automatically for the CTAN fonts. /UV |
| 2512 |
|
| 2513 |
\item |
| 2514 |
Worry about excessive kern tables in \texttt{T1} fonts. (Alan) |
| 2515 |
|
| 2516 |
I think the best way to get at this would be to write a program |
| 2517 |
that can optimize (for size) kern tables by making use of the |SKIP| |
| 2518 |
instruction. There's often room for quite a lot of compression. |
| 2519 |
Such a program would however have to be written in some compiling |
| 2520 |
language, otherwise it wouldn't be fast enough. /LH |
| 2521 |
|
| 2522 |
\item |
| 2523 |
Consider making |\set|(|left|\textbar|right|)|kerning| parameterized |
| 2524 |
by the size of the other glyph, eg so that faking |<Asmall><T>| can |
| 2525 |
be different from |<Aacutesmall><T>|. Suggested by Hilmar Schlegel. |
| 2526 |
|
| 2527 |
\end{itemize} |
| 2528 |
|
| 2529 |
|
| 2530 |
\subsection{Things that have been done} |
| 2531 |
|
| 2532 |
\begin{itemize} |
| 2533 |
\item |
| 2534 |
Update documentation (comments from Karl and Damian). |
| 2535 |
|
| 2536 |
Rowland has meritoriously done the update requested here. On the |
| 2537 |
other hand, it needs to be updated again, since many new features |
| 2538 |
have been added. /LH |
| 2539 |
|
| 2540 |
\item |
| 2541 |
Investigate using raw SC fonts. (Alan) |
| 2542 |
|
| 2543 |
This problem comes up on the mailing list from time to time. |
| 2544 |
The problem is that \package{fontinst}'s |\latinfamily| command |
| 2545 |
is geared towards fonts that come with standard and expert font |
| 2546 |
sets (as with Adobe and Monotype fonts) rather than fonts that |
| 2547 |
come with standard and small caps (as with Linotype fonts). |
| 2548 |
I'm afraid it would be to complicated to handle both cases |
| 2549 |
in the same |\latinfamily| procedure. /UV |
| 2550 |
|
| 2551 |
\item |
| 2552 |
Investigate problems with duplicate kerns appearing in VPL files |
| 2553 |
(Hilmar Schlegel). |
| 2554 |
|
| 2555 |
The problem has been investigated and is solved with v\,1.9. /LH |
| 2556 |
|
| 2557 |
\item |
| 2558 |
Find out why, if you have a font with both medium and light variants |
| 2559 |
but no italic, you get |m|/|it| $\mapsto$ |l|/|it| $\mapsto$ |
| 2560 |
|l|/|sl| rather than |m|/|it| $\mapsto$ |m|/|sl|. |
| 2561 |
(Sebastian). |
| 2562 |
|
| 2563 |
Because for every shape that \package{fontinst} is allowed to use |
| 2564 |
a given font for, it will perform all possible series substitutions. |
| 2565 |
If the |\installfont| for |l|/|sl| came before the |\installfont| for |
| 2566 |
|m|/|sl|, then substitutions will be as described above. See also |
| 2567 |
item about the substitution mechanism. /LH |
| 2568 |
|
| 2569 |
\item |
| 2570 |
AFM files can contain real units, not just integers. (Gintautas |
| 2571 |
Grigelionis). |
| 2572 |
|
| 2573 |
This is fixed with v\,1.9. /LH |
| 2574 |
|
| 2575 |
\item |
| 2576 |
Make \texttt{fontdoc.sty} and co.\ use PS fonts. (Alan) |
| 2577 |
|
| 2578 |
I think |\useexamplefont| and friends (introduced with v\,1.8) |
| 2579 |
pretty much do what was intended here. /LH |
| 2580 |
|
| 2581 |
\item |
| 2582 |
\texttt{latin.mtx} uses \package{fontinst} rather than |
| 2583 |
\package{fontdoc}! (Rob Hutchings). |
| 2584 |
|
| 2585 |
\item |
| 2586 |
Allow |.vpl| files to be read as |.pl| files. (Constantin) |
| 2587 |
|
| 2588 |
\item |
| 2589 |
Richard Walker reports that if you say |
| 2590 |
\begin{quote} |
| 2591 |
|\latinfamily{mbvx}{}|\\ |
| 2592 |
|\latinfamily{mbv9}{}| |
| 2593 |
\end{quote} |
| 2594 |
then the 2nd run doesn't use old-style digits, because the 1st run |
| 2595 |
has already defined |\digit|. If so, this is because |\latinfamily| |
| 2596 |
is missing a bracing level. I should investigate. |
| 2597 |
|
| 2598 |
I think it is best to do oldstyle and non-oldstyle variants in two |
| 2599 |
separate fontinst runs, i.e. don't use |\latinfamily| more than once |
| 2600 |
in a single run. (IIRC, grouping doesn't work properly since |
| 2601 |
every single font closes and reopens a |\begingroup|-|\endgroup| |
| 2602 |
pair to encapsulate the kerning info\footnote{And glyph metrics |
| 2603 |
info, and glyph mapcommands info \textellipsis /LH} or something |
| 2604 |
like that.) /UV |
| 2605 |
|
| 2606 |
\item |
| 2607 |
Consider writing an |\installfontas| command which doesn't |
| 2608 |
generate a (V)PL but makes an entry in the FD file. |
| 2609 |
Typical usage: Install an \texttt{sc} shape of a \texttt{TS1} |
| 2610 |
font family by using the font made for the \texttt{n} shape. |
| 2611 |
(Lars) |
| 2612 |
|
| 2613 |
Done. The described installation for the \texttt{m} series of the |
| 2614 |
\texttt{ptm} font family can be done through |
| 2615 |
\begin{quote} |
| 2616 |
|\installfontas{ptmr8c}{TS1}{ptm}{m}{sc}{}| |
| 2617 |
\end{quote} |
| 2618 |
Note however that you need to do it in each series explicitly. /LH |
| 2619 |
|
| 2620 |
\item |
| 2621 |
Use the \texttt{StdVW} property from AFM 4.0 files instead of the |
| 2622 |
width of \textit{I} for standard stem fontdimen. Pointed out by |
| 2623 |
Hilmar Schlegel. |
| 2624 |
|
| 2625 |
Partially done. |\afmtomtx| writes a |
| 2626 |
|\setint{verticalstem}|\marg{value} when it encounters a |
| 2627 |
\texttt{StdVW} property. The ETX files have not yet (2000/05/30) |
| 2628 |
been changed to use this value. /LH |
| 2629 |
|
| 2630 |
\item |
| 2631 |
\package{fontdoc} has a problem with glyph, integer, string, |
| 2632 |
etc.\ names that contains underscores, since these will cause |
| 2633 |
\TeX\ to jump to math mode when one tries to typeset these things. |
| 2634 |
Unfortunately \package{fontinst} itself writes two such integers: |
| 2635 |
\texttt{descender_neg} and \texttt{maxdepth_neg}. There are at |
| 2636 |
least three solutions to this. The first is to make underscore an |
| 2637 |
`other' character throughout, but this might break some comments in |
| 2638 |
MTX and ETX files. The second is to temporarily change the catcode |
| 2639 |
in the arguments of the commands, but that will complicate the |
| 2640 |
definitions of almost all \package{fontdoc} commands dramatically. |
| 2641 |
The third is to declare this as unsupported by \package{fontdoc} and |
| 2642 |
change \package{fontinst} so that the troublesome integers are |
| 2643 |
renamed, e.g.\ \texttt{descender-neg} and \texttt{maxdepth-neg}, but |
| 2644 |
this can break people's code. (Lars) |
| 2645 |
|
| 2646 |
After thinking about it for a couple of months, I realized that |
| 2647 |
none of the above is the right solution. That is instead to use |
| 2648 |
something similar to the harmless character strings of the |
| 2649 |
\package{xdoc} package when typesetting names of variables etc.\ |
| 2650 |
in \package{fontdoc}. This got implemented in v\,1.916. /LH |
| 2651 |
|
| 2652 |
\item |
| 2653 |
Modify the (V)PL-to-MTX converter so that |\setint|\discretionary |
| 2654 |
{}{}{}|{fontdimen(|\meta{n}|)}|\discretionary{}{}{}|{\int|% |
| 2655 |
\marg{name}|}| commands in the ETX file declare that |
| 2656 |
\texttt{PARAMETER} (or equivalent) properties for fontdimen |
| 2657 |
\meta{n} should be converted to |\setint| commands for the integer |
| 2658 |
\meta{name}. This ought to be particularly useful for math fonts. |
| 2659 |
(Lars) |
| 2660 |
|
| 2661 |
Done with v\,1.917, but only for the new \cs{setfontdimen} |
| 2662 |
command. /LH |
| 2663 |
|
| 2664 |
\item |
| 2665 |
Update \texttt{fontdoc.sty} and co.\ for \LaTeXe. (Alan) |
| 2666 |
|
| 2667 |
\texttt{fontdoc.sty} underwent a major overhaul from v\,1.916 on, |
| 2668 |
so I suspect this can be said to have been done now. The basic |
| 2669 |
vertical spacing put in by \cs{Aheading} and \cs{Bheading} may |
| 2670 |
however need more work; sometimes it doesn't come out as one |
| 2671 |
would want it to. /LH |
| 2672 |
|
| 2673 |
\item |
| 2674 |
\texttt{latin.mtx} fakes composite SC glyphs [kerning?] from the |
| 2675 |
composite glyph, eg. |
| 2676 |
\begin{quote} |
| 2677 |
|\setleftrightkerning{Aacutesmall}{Aacute}{900}|, |
| 2678 |
\end{quote} |
| 2679 |
rather than from the SC non-composite, eg. |
| 2680 |
\begin{quote} |
| 2681 |
|\setleftrightkerning{Aacutesmall}{Asmall}{1000}| |
| 2682 |
\end{quote} |
| 2683 |
This may cause problems with SC fonts with explicit SC--C kerns, |
| 2684 |
eg. |
| 2685 |
\begin{quote} |
| 2686 |
|\setkern{V}{Asmall}{100}| |
| 2687 |
\end{quote} |
| 2688 |
This needs to be thought about. Pointed out by Hilmar Schlegel. |
| 2689 |
|
| 2690 |
\texttt{newlatin.mtx} does this right; shrunk glyphs get shrunk |
| 2691 |
kerning, whereas constructed glyphs get kerning from the base |
| 2692 |
letter. /LH |
| 2693 |
|
| 2694 |
\end{itemize} |
| 2695 |
|
| 2696 |
|
| 2697 |
\subsection{Other notes} |
| 2698 |
|
| 2699 |
Alan's \texttt{TODO} file also contains some items regarding |
| 2700 |
\package{mathptm}, but that seems to have migrated out of |
| 2701 |
\package{fontinst} (if it ever really was a part). The problem is that |
| 2702 |
\package{mathptm} cannot be changed any more for the sake of checksum |
| 2703 |
consistency and backwards compatibility. A new variant called |
| 2704 |
\package{mathptmx} tries to do a little better, but there may still be |
| 2705 |
room for improvements. |
| 2706 |
|
| 2707 |
|
| 2708 |
|
| 2709 |
\section{Efficiency} |
| 2710 |
|
| 2711 |
This section records the results of some (rather simple) test runs |
| 2712 |
that have been made to test the efficiency of \package{fontinst}, |
| 2713 |
primarily to see how changes in the implementation affect efficiency |
| 2714 |
by comparing the time and space used by different \package{fontinst} |
| 2715 |
versions to complete the same task. |
| 2716 |
|
| 2717 |
|
| 2718 |
\subsection{Alan Jeffrey's tests} |
| 2719 |
\label{Ssec: ASAJ tests} |
| 2720 |
|
| 2721 |
I compared the version where you try to keep ints as |\mathchardef|s |
| 2722 |
with the version where you don't bother, and for a sample font without |
| 2723 |
|\mathchardef|s I got: |
| 2724 |
\begin{quote} |
| 2725 |
114673 words of memory out of 150001\\ |
| 2726 |
Time elapsed: 135.0 seconds |
| 2727 |
\end{quote} |
| 2728 |
and with, I got: |
| 2729 |
\begin{quote} |
| 2730 |
114050 words of memory out of 150001\\ |
| 2731 |
Time elapsed: 134.5 seconds |
| 2732 |
\end{quote} |
| 2733 |
so I've saved a little memory and time. Not brilliant, but I may as |
| 2734 |
well keep it in. |
| 2735 |
|
| 2736 |
Where possible, we avoid re-scaling kerns, which saves a bit of time |
| 2737 |
and memory. With a sample font, the version where we didn't avoid |
| 2738 |
re-scaling used: |
| 2739 |
\begin{quote} |
| 2740 |
114050 words of memory out of 150001\\ |
| 2741 |
Time elapsed: 134.5 seconds |
| 2742 |
\end{quote} |
| 2743 |
whereas the version where we do avoid it used: |
| 2744 |
\begin{quote} |
| 2745 |
113786 words of memory out of 150001\\ |
| 2746 |
Time elapsed: 124.9 seconds |
| 2747 |
\end{quote} |
| 2748 |
|
| 2749 |
We keep the names of the glyphs to kern with as |\l-|\meta{name} and |
| 2750 |
|\r-|\meta{name} to save on token space, and this got the resources |
| 2751 |
used down to: |
| 2752 |
\begin{quote} |
| 2753 |
88574 words of memory out of 150001\\ |
| 2754 |
Time elapsed: 106.1 seconds |
| 2755 |
\end{quote} |
| 2756 |
Keeping track of the kern amounts as |\|\meta{amount} got the resources |
| 2757 |
used down to: |
| 2758 |
\begin{quote} |
| 2759 |
75424 words of memory out of 150001\\ |
| 2760 |
Time elapsed: 97.2 seconds |
| 2761 |
\end{quote} |
| 2762 |
Mind you, I then added all the |\transformfont| stuff, and it went |
| 2763 |
back to: |
| 2764 |
\begin{quote} |
| 2765 |
77079 words of memory out of 150001\\ |
| 2766 |
Time elapsed: 97.7 seconds |
| 2767 |
\end{quote} |
| 2768 |
|
| 2769 |
|
| 2770 |
|
| 2771 |
\subsection{Current tests} |
| 2772 |
|
| 2773 |
The setup for this test is that \TeX\ is run on a \texttt{.tex} file |
| 2774 |
consisting of the following commands. |
| 2775 |
\begin{quote} |
| 2776 |
|\batchmode|\\ |
| 2777 |
|\input fontinst.sty|\\ |
| 2778 |
|\latinfamily{pad}{}|\\ |
| 2779 |
|\tracingstats=1\bye| |
| 2780 |
\end{quote} |
| 2781 |
All the font metrics are generated from the AFM files; temporary MTX, |
| 2782 |
PL, and VPL files are deleted between test runs. The format used was |
| 2783 |
generated by typing |\dump| at ini\TeX's |**| prompt; thus there is no |
| 2784 |
overhead from a typesetting format in the space requirements. |
| 2785 |
|
| 2786 |
[It appears the exact data from these tests will have to wait, since |
| 2787 |
I haven't been able to get access to any computer with reliable |
| 2788 |
process timing. For the next release perhaps \textellipsis\ /LH] |
| 2789 |
|
| 2790 |
% The \TeX\ version used is \TeX~3.14159. The \TeX\ implementation used |
| 2791 |
% is te\TeX~0.9 (Web2C~7.2), running on a |
| 2792 |
% |
| 2793 |
% The \emph{input sources} figure lists how many items are used on |
| 2794 |
% \TeX's stack for simultaneous input sources. As an input source in |
| 2795 |
% this context is considered not only input files, but also (and mainly) |
| 2796 |
% various token lists. Most of these token lists are replacement texts |
| 2797 |
% and parameters of macros, but token list items on this stack also come |
| 2798 |
% from expansions of |\the| (not only when applied to a |\toks| register) |
| 2799 |
% and the like. The input source stack sizes of normal \TeX\ |
| 2800 |
% implementations are usually several times larger than what |
| 2801 |
% \package{fontinst} uses, so this particular resource shouldn't cause |
| 2802 |
% any trouble. |
| 2803 |
% |
| 2804 |
% The \emph{parameter} figure is the maximal number of macro parameters that |
| 2805 |
% \TeX\ has to remember at any one time. The reason this number is |
| 2806 |
% greater than 9 is that it counts parameters in \emph{all} macros that |
| 2807 |
% are on the input sources stack, not just those in the top one. The |
| 2808 |
% same remark about the likelyhood of \TeX\ running out of this resource |
| 2809 |
% during a \package{fontinst} run as for input sources applies for |
| 2810 |
% parameters. |
| 2811 |
% |
| 2812 |
% The \emph{buffer characters} stack holds lines read from input files that |
| 2813 |
% are partially tokenized (if several files are on the input sources |
| 2814 |
% stack then \TeX\ must remember the last line read from each of them) and |
| 2815 |
% characters for |\csname| \textellipsis |\endcsname| constructions that |
| 2816 |
% are being expanded. This shouldn't cause any trouble either. |
| 2817 |
% |
| 2818 |
% The \emph{save values} figure is the maximum number of items on \TeX's |
| 2819 |
% save stack at any time. \package{fontinst} uses massive amounts of |
| 2820 |
% space here (compared to normal \TeX\ documents), but there isn't much |
| 2821 |
% that can be done about this since \package{fontinst} uses \TeX's |
| 2822 |
% grouping mechanism to clear data for one font from memory before |
| 2823 |
% processing begins with the next. |
| 2824 |
% |
| 2825 |
% The \emph{multiletter control sequences} figure is exactly |
| 2826 |
% that---the number of control sequences whose names consist of more than |
| 2827 |
% one character. When these become too many, \TeX\ complains that its |
| 2828 |
% hash table is full. Some of these control sequences are macros that |
| 2829 |
% \package{fontinst} uses in a procedure-like manner, but many of them are |
| 2830 |
% rather used as data tables. As a comparision of the figure I might |
| 2831 |
% mension that my \LaTeX\ used 3748 multiletter control sequences for |
| 2832 |
% typesetting this document, so \package{fontinst} rather average in |
| 2833 |
% this respect (perhaps a bit above, but not much). |
| 2834 |
% |
| 2835 |
% The \emph{strings} figure tells how many items \TeX\ put in its string |
| 2836 |
% pool and the \emph{string characters} figure tells how many characters |
| 2837 |
% these contain altogether. There are two main categories of things that |
| 2838 |
% occur here: names of multiletter control sequences and \TeX's builtin |
| 2839 |
% error messages. One thing which certainly doesn't occur here is the |
| 2840 |
% texts you save using \package{fontinst}'s |\setstr| command; these will |
| 2841 |
% instead become token lists and occupy main memory space (the \emph{names} |
| 2842 |
% of string variables will however become part of a control sequence name, |
| 2843 |
% so that will be stored as a string). Unlike some other \TeX\ |
| 2844 |
% implementations however, the Web2C \TeX\ seems to only report new |
| 2845 |
% entries in the string pool, so the \emph{strings} and \emph{string |
| 2846 |
% characters} figures below do not include the builtin error messages. |
| 2847 |
% On the other hand, they don't include the names of the 322 primitive |
| 2848 |
% multiletter control sequences either, which is why the figures below |
| 2849 |
% report more control sequences than strings. |
| 2850 |
% |
| 2851 |
% The \emph{main memory}, finally, is where \TeX\ stores almost |
| 2852 |
% everything else (I've skipped some of the memory categories \TeX\ |
| 2853 |
% reports since they are ``only'' used for typesetting), most notably |
| 2854 |
% tokens. Each token occupies one word of memory. I don't think |
| 2855 |
% \package{fontinst}'s consumption of main memory is that high (in |
| 2856 |
% comparision with normal \LaTeX\ jobs) since \package{fontinst} doesn't |
| 2857 |
% have to store any boxes here and thus frees space for more tokens. |
| 2858 |
% |
| 2859 |
% \begin{description} |
| 2860 |
% \item[v\,1.801] |
| 2861 |
% \consumption{126.68}{%954.9 |
| 2862 |
% % 5261 strings out of 8681 |
| 2863 |
% % 54607 string characters out of 136047 |
| 2864 |
% % 112422 words of memory out of 200001 |
| 2865 |
% % 3814 multiletter control sequences out of 10000 |
| 2866 |
% % 8 words of font info for 0 fonts, out of 180000 for 256 |
| 2867 |
% % 0 hyphenation exceptions out of 2551 |
| 2868 |
% % 30i,0n,42p,220b,1696s stack positions out of 600i,150n,200p,3000b,4094s |
| 2869 |
% 3903 strings out of 13688 |
| 2870 |
% 42612 string characters out of 101822 |
| 2871 |
% 112422 words of memory out of 263001 |
| 2872 |
% 3961 multiletter control sequences out of 10000+0 |
| 2873 |
% 7 words of font info for 0 fonts, out of 200000 for 1000 |
| 2874 |
% 0 hyphenation exceptions out of 1000 |
| 2875 |
% 30i,0n,42p,220b,1770s stack positions out of 300i,100n,500p,30000b,4000s |
| 2876 |
% }% Compulsory comment; TeX inserts a & at the end of this line |
| 2877 |
% % as a side-effect of the implementation of \consumption. |
| 2878 |
% \item[v\,1.902] |
| 2879 |
% \consumption{139.59}{%997.4 |
| 2880 |
% % 6196 strings out of 8681 |
| 2881 |
% % 69530 string characters out of 136047 |
| 2882 |
% % 112617 words of memory out of 200001 |
| 2883 |
% % 4749 multiletter control sequences out of 10000 |
| 2884 |
% % 8 words of font info for 0 fonts, out of 180000 for 256 |
| 2885 |
% % 0 hyphenation exceptions out of 2551 |
| 2886 |
% % 28i,0n,42p,220b,2004s stack positions out of 600i,150n,200p,3000b,4094s |
| 2887 |
% 4690 strings out of 13688 |
| 2888 |
% 52734 string characters out of 101822 |
| 2889 |
% 112613 words of memory out of 263001 |
| 2890 |
% 4748 multiletter control sequences out of 10000+0 |
| 2891 |
% 7 words of font info for 0 fonts, out of 200000 for 1000 |
| 2892 |
% 0 hyphenation exceptions out of 1000 |
| 2893 |
% 28i,0n,42p,220b,2000s stack positions out of 300i,100n,500p,30000b,4000s |
| 2894 |
% }% |
| 2895 |
% Comparing the figures for v\,1.902 with those of v\,1.801, there |
| 2896 |
% are mainly three things which are of interest. The first is that |
| 2897 |
% the number of items on the save stack have increased quite a lot. |
| 2898 |
% Most of this is due to the mechanism by which \package{fontinst} |
| 2899 |
% avoids writing multiple kerns to (V)PL files. The second thing to |
| 2900 |
% notice is that the number of control sequences has increased quite |
| 2901 |
% dramatically (over 20\%). This is to be expected, as a number of |
| 2902 |
% new features have been added and the implementation of these |
| 2903 |
% features requires many new macros. |
| 2904 |
% |
| 2905 |
% Some 200 of these new control sequences are however not there |
| 2906 |
% because of new features, but because of a silly implementation of |
| 2907 |
% how slot numbers for glyphs are stored. In an attempt to save |
| 2908 |
% tokens, I (LH) stored these numbers as control sequence names |
| 2909 |
% rather than token sequences, just like kern amounts have been |
| 2910 |
% stored for some time now. One notable feature of kern |
| 2911 |
% amounts is however that although these may assume just about any |
| 2912 |
% value you can think of, within any given font family they tend to |
| 2913 |
% assume only a handful of values. This means that the number of |
| 2914 |
% hash positions occupied by such control sequences is never very |
| 2915 |
% large and the storage is efficient. On the other hand, the set of |
| 2916 |
% slot numbers that occur usually consists of all integers in the |
| 2917 |
% range 0--255, with each slot number occuring in at most one |
| 2918 |
% position. This means that the storage method, although efficient |
| 2919 |
% in the number of tokens, really squanders space in the hash table. |
| 2920 |
% A much better method (which should be implemented, once I get round |
| 2921 |
% to it) is to store slot numbers in the character codes of `ordinary' |
| 2922 |
% tokens. |
| 2923 |
% |
| 2924 |
% The third noticable thing is that although the number of macros |
| 2925 |
% has grown quite a lot, the amount of main memory used has hardly |
| 2926 |
% increased at all! Some of this is probably due to that the ENC to |
| 2927 |
% ETX converter was moved to \texttt{finstmsc.sty}, since this |
| 2928 |
% consists of only two macros but lots of tokens. Another factor |
| 2929 |
% that has probably helped is that |\glyph| now avoids rescaling a |
| 2930 |
% glyph by one thousand; this saves 9 tokens for each time |
| 2931 |
% |\glyph|\marg{name}|{1000}| gets executed. |
| 2932 |
% \item[v\,1.907] |
| 2933 |
% \consumption{138.88}{%1019.9 |
| 2934 |
% % 6226 strings out of 8681 |
| 2935 |
% % 69918 string characters out of 136047 |
| 2936 |
% % 113820 words of memory out of 200001 |
| 2937 |
% % 4779 multiletter control sequences out of 10000 |
| 2938 |
% % 8 words of font info for 0 fonts, out of 180000 for 256 |
| 2939 |
% % 0 hyphenation exceptions out of 2551 |
| 2940 |
% % 28i,0n,42p,220b,2006s stack positions out of 600i,150n,200p,3000b,4094s |
| 2941 |
% % 6225 strings out of 8681 |
| 2942 |
% 4719 strings out of 13688 |
| 2943 |
% 53105 string characters out of 101822 |
| 2944 |
% 113814 words of memory out of 263001 |
| 2945 |
% 4777 multiletter control sequences out of 10000+0 |
| 2946 |
% 7 words of font info for 0 fonts, out of 200000 for 1000 |
| 2947 |
% 0 hyphenation exceptions out of 1000 |
| 2948 |
% 28i,0n,42p,220b,2002s stack positions out of 300i,100n,500p,30000b,4000s |
| 2949 |
% }% |
| 2950 |
% This is pretty much what could be expected. A couple of new |
| 2951 |
% features have been added, so naturally some of the numbers have |
| 2952 |
% grown a little. |
| 2953 |
% \item[v\,1.908] |
| 2954 |
% This version is devoted to optimizing \package{fontinst}. |
| 2955 |
% |
| 2956 |
% The first idea was to avoid moving the contents of |
| 2957 |
% |\glyph_map_commands| and |\glyph_map_fonts| to a macro and back |
| 2958 |
% again each time these are updated. This changed the numbers to |
| 2959 |
% \consumption{135.64}{% |
| 2960 |
% 4719 strings out of 13688 |
| 2961 |
% 53105 string characters out of 101822 |
| 2962 |
% 113810 words of memory out of 263001 |
| 2963 |
% 4777 multiletter control sequences out of 10000+0 |
| 2964 |
% 7 words of font info for 0 fonts, out of 200000 for 1000 |
| 2965 |
% 0 hyphenation exceptions out of 1000 |
| 2966 |
% 28i,0n,42p,220b,2002s stack positions out of 300i,100n,500p,30000b,4000s |
| 2967 |
% }% |
| 2968 |
% Hence I've earned a few seconds. |
| 2969 |
% |
| 2970 |
% The next idea is to expand the |\space|s in |\out_lline| and |
| 2971 |
% friends when these are defined, instead of expanding them anew |
| 2972 |
% each time an output line is written. |
| 2973 |
% \item[v\,1.909] |
| 2974 |
% \consumption{}{%1159.8 % Ow! It's getting worse. |
| 2975 |
% % 6155 strings out of 8681 |
| 2976 |
% % 68824 string characters out of 136047 |
| 2977 |
% % 113918 words of memory out of 200001 |
| 2978 |
% % 4708 multiletter control sequences out of 10000 |
| 2979 |
% % 8 words of font info for 0 fonts, out of 180000 for 256 |
| 2980 |
% % 0 hyphenation exceptions out of 2551 |
| 2981 |
% % 28i,0n,42p,220b,1982s stack positions out of 600i,150n,200p,3000b,4094s |
| 2982 |
% } |
| 2983 |
% \item[v\,1.910] |
| 2984 |
% \consumption{}{%1031.6 % Perhaps not ... |
| 2985 |
% % 5949 strings out of 8681 |
| 2986 |
% % 68261 string characters out of 136047 |
| 2987 |
% % 113840 words of memory out of 200001 |
| 2988 |
% % 4502 multiletter control sequences out of 10000 |
| 2989 |
% % 8 words of font info for 0 fonts, out of 180000 for 256 |
| 2990 |
% % 0 hyphenation exceptions out of 2551 |
| 2991 |
% % 28i,0n,42p,220b,1756s stack positions out of 600i,150n,200p,3000b,4094s |
| 2992 |
% } |
| 2993 |
% \end{description} |
| 2994 |
% |
| 2995 |
|
| 2996 |
|
| 2997 |
\begin{thebibliography}{99} |
| 2998 |
\bibitem{Fontname} |
| 2999 |
Karl Berry: \textit{Fontname}, CTAN:\discretionary{}{}{}% |
| 3000 |
\texttt{info}\slash \texttt{fontname}\slash \texttt{fontname.texi} |
| 3001 |
(and most of the other files in that directory as well). |
| 3002 |
\bibitem{mfnt} |
| 3003 |
Matthias Clasen and Ulrik Vieth: |
| 3004 |
\texttt{mfnt} (their ``work with math fonts''), 1997--8, |
| 3005 |
see \textsc{http}:/\slash \texttt{www.tug.org}\slash |
| 3006 |
\texttt{twg}\slash \texttt{mfg}\slash\texttt{archives}/. |
| 3007 |
\bibitem{LaTeX-companion} |
| 3008 |
Michel Goossens, Frank Mittelbach, Alexander Samarin: |
| 3009 |
\textit{The \LaTeX\ Companion}, |
| 3010 |
Ad\-di\-son-Wes\-ley, Reading, MA, USA, 1994. |
| 3011 |
% Addison and Wesley are names of two persons, but they |
| 3012 |
% should be joined by a hyphen since Addison-Wesley is |
| 3013 |
% a company name. Tricky that. |
| 3014 |
\bibitem{LaTeX-graph-comp} |
| 3015 |
Michel Goossens, Sebastian Rahtz, Frank Mittelbach: |
| 3016 |
\textit{The \LaTeX\ Graphics Companion: Illustrating Documents with |
| 3017 |
\TeX\ and PostScript}, |
| 3018 |
Ad\-di\-son-Wes\-ley, Reading, MA, USA, 1997; |
| 3019 |
ISBN~0-201-85469-4. |
| 3020 |
\bibitem{TAOCP2} |
| 3021 |
Donald E.\ Knuth: \textit{The art of computer programming}, |
| 3022 |
vol.~2 (\textit{Seminumerical algorithms}), 3rd ed., |
| 3023 |
Ad\-di\-son-Wes\-ley, 1997. |
| 3024 |
\bibitem{TeXbook} |
| 3025 |
Donald E.\ Knuth, Duane Bibby (illustrations): |
| 3026 |
\textit{The \TeX book}, |
| 3027 |
Ad\-di\-son-Wes\-ley, 1991, ISBN~0-201-13448-9; |
| 3028 |
also volume A of \textit{Computers and typesetting}, |
| 3029 |
ISBN~0-201-13447-0. |
| 3030 |
\bibitem{fntguide} |
| 3031 |
\LaTeX3 Project Team: \textit{\LaTeXe{} font selection}, |
| 3032 |
CTAN: \texttt{macros}\slash |
| 3033 |
\texttt{latex}\slash\texttt{base}\slash\texttt{fntguide.tex}. |
| 3034 |
\end{thebibliography} |
| 3035 |
|
| 3036 |
|
| 3037 |
\end{document} |