\documentclass[11pt]{article}
\usepackage{url}

\addtolength{\textheight}{5\baselineskip}
\addtolength{\topmargin}{-4\baselineskip}

\title{MM Support in V\TeX\ 7.3+}
\date{March 15, 2001 \\
Revised for V\TeX/Free 8.36, November 2003}
\author{Michael Vulis}

\begin{document}
\newcommand{\fileitem}[1]{\item[{\mdseries\path{#1}}]}

\maketitle

\sloppy

\section{Multiple Master fonts}

The Multiple Master (MM) technology has been offered by Adobe in the early
nineties as a way of creating a large number of variant fonts, differing
from the basic design in weight, spacing, or the design size. Adobe, over
a span of a few years, has designed about ninety multiple master fonts,
extending several traditional designs into MM, as well as offering several
brand new ones (Minion and Myriad, for example). While ultimately Adobe
has abandoned its MM effort, the existing Multiple Master fonts are among
the most interesting fonts around.  

Until now, there was no transparent way of using MM fonts in \TeX. While
any MM font can be used as a single-master font (based on the default
parameter values), and most \TeX\ software can use MM fonts in such way,
this forfeits all the design variations, which is the only reason to
use MM fonts in the first place. The use of the MM instancing software
(MMInstance, for example) does allow access to the designs, but only
the pre-chosen ones, and requires to maintain the instance fonts.

V\TeX\ 7.3+, on the other hand, incorporates the instancing ability
as part of the compiler and creates both the instance fonts and the
required metrics on the fly.

\section{Font name and metrics instancing}

To simplify the access to the instance fonts, V\TeX\ extends the
syntax of the \TeX\ \verb|\font| command with this convention:
if the font name includes brackets, the values within the brackets
are the instancing parameters. For example, in

\begin{verbatim}
\font\sm=xo______
\font\mm=xo______[300,10]
\end{verbatim}
the \verb|\sm| \verb|\font| declaration defines the default shape of the
Multiple Master CronosMM font; but the second declaration defines an
instance of this MM font to be constructed dynamically.

The first declaration causes \TeX\ to load the usual \verb|.tfm| metrics
file (\verb|xo______.tfm|); the second declaration causes \TeX\ to load the
Multiple font Metrics file (\verb|xo______.mfm|) and generate the
instance metrics on the fly. Because of the use of \verb|.mfm| files providing
metrics file for each instance becomes unnecessary.

The additional variation of the syntax is the encoding vector. Without the
encoding vector, MM instances are built in the \verb|StandardEncoding|
layouts; these are generally suitable only for English writing. Reencoded
fonts can be specified with the \verb|e=...| clause. For example

\begin{verbatim}
\font\mm=xo______[e=ly1,300,10]
\end{verbatim}
builds a LY1-encoded instance of the CronosMM font.

Since it is currently impossible to use virtual fonts over MM instances
(the Multiple Master Virtual Font format is yet to be invented), we recommend
using MM instances together with a suitable encoding vector. For most european
languages, the LY1 encoding is suitable.

\section{Dynamic metrics creation}
The following rules govern the dynamic font metrics creation:
\begin{itemize}
\item space size (\verb|\param[1]|) is set to the width of the space
  character (which is always present in MM fonts).
\item space stretch (\verb|\param[2]|) is set to double of space size.
\item space shrink (\verb|\param[3]|) is set to two thirds of space size.
\item x-height (\verb|\param[4]|) is set to height of the always present
 letter \verb|x|.
\item quad (\verb|\param[5]|) is set to four times of space size.
\item extra space (\verb|\param[6]|) is set to be equal to space size.
\end{itemize}
All of these assignments can be changed by changing the parameters upon
loading the font.

The following ligatures are automatically formed when creating the instance
metrics (assuming that the ligatures are indeed present in the fonts):
\begin{itemize}
\item \verb|/fi|
\item \verb|/fl|
\item \verb|/endash|
\item \verb|/emdash|
\item \verb|/quotedblleft|
\item \verb|/quotedblright|
\end{itemize}

\section{Font instancing; Configuration}

MM support necessitated making several changes in the format of
V\TeX\ font mapping files. These changes are
\begin{itemize}
\item the \verb|g| option
\item the \verb|m| option
\item the dynamic name option
\end{itemize}

All three syntax additions are used in the file,
\verb|mm.ali|. Here are the sample entries to declare the CronosMM font:

\begin{verbatim}
@CronosMM = xo______ %100,100
@CronosMM%s_%04d_wt_%04d_op = xo______ %100,100,g,
  b="xo______",m="250..700,6..72"
\end{verbatim}

The first entry is used for declare the non-reencoded, non-instanced
version of CronosMM; the second is the template for the instance fonts,
as explained below.

The font instancing is accomplished by pure PostScript (GeX) means. An
essential twist here is that by default V\TeX\ does not load Type~1 fonts
into GeX (which would have hurt the performance).

V\TeX\ 7.3+ allows the additional option ``\verb|g|'' to be listed in the
font configuration files. The \verb|g| option forces the fonts to be
loaded via the GeX interpreter; this makes instancing possible. In
addition to \verb|g|, the \verb|m| option is used to specify the valid
ranges for the MM instancing. For example, the Cronos MM font, which
has two design axes, is defined in the configuration files with the
\begin{verbatim}
        m="250..700,6..72"
\end{verbatim}
option; this means that the first axis (weight) parameter ranges between 250
and 700; the second axis (design size) ranges between 6 and 72.

In order to avoid having to declare each instance of the Multiple Master
font, the new syntax allows to define the font names as templates
(C-formattable strings). For example, the instances of Cronos MM are
declared as
\begin{verbatim}
        CronosMM%s_%04d_wt_%04d_op
\end{verbatim}
where the \verb|%04d| substrings get replaced with the weight and design
size of the instance, when it is formed; the \verb|%s| substring gets
replaced with the encoding name.

\section{The distribution}
MM support is part of the V\TeX/Free distribution from release 8.36 on
and covers two areas:  
\begin{itemize}
\item Metrics and font mapping files for a number of MM fonts from Adobe.
\item A MM math extension font named ``cmm10exMM'' and the related support files.
\end{itemize}
In detail, this  comprises the following files (path names are relative to \path{texmf/}):
\begin{description}
\fileitem{fonts/tfm/adobe/mm/*}
  Font metrics  (\path{mfm} and \path{tfm}) for Adobe's MM fonts.
\fileitem{fonts/map/vtex/mm.ali}
  A font mapping file for Adobe's MM fonts.
\fileitem{fonts/type1/micropress/mathexmm/cmex10mm.pfb}
  The MM math extension font cmm10exMM.
\fileitem{fonts/tfm/micropress/mathexmm/*}
  Metrics files for cmm10exMM.
\fileitem{tex/latex/mathexmm/mathexmm.sty}
  A \LaTeX\ macro package to make use of the cmm10exMM font.
\fileitem{doc/latex/mathexmm/mathexmm.pdf}
  Documentation on cmex10MM and the related macro package.
\fileitem{doc/vtex/MM/mm_man.tex}
  The \LaTeX\ source code of the present document
  (with some changes, so that it can be compiled using the \verb|article| class and CM fonts).
  It requires the below \path{*.exm} example fragments and the ``Adobe Sans'' and ``Adobe Serif''
  fonts.
\fileitem{texmf/doc/vtex/MM/*.exm}
  Source code fragments to show instances for various MM fonts.
  These files can also be compiled stand-alone 
  in the PDF mode with GeX enabled under the Plain \TeX\ format.
\end{description}

Adobe's MM fonts can be installed by copying or linking them into the directory 
\path{texmf/fonts/type1/adobe/MM}.  On Unix, make sure that the file names are lowercase!
The fonts are \emph{not} part of the V\TeX\ distribution;
``Adobe Sans'' and ``Adobe Serif'' (\verb|zx______| and \verb|\zy______|), however, 
come with Acrobat, so you should have these at least.

Notice that before using Adobe's MM fonts, you need to include a record for
the \verb|mm.ali| file into the \texttt{TYPE1} section of the configuration file \verb|pdf.fm|.
The cmex10MM font, in contrast, is already usable with the default configuration.




\def\centerline#1{}
%\section{Samples: Minion}
%\let\End\end \let\end\endinput
%\input zgrg____.exm
%\let\end\End

%\section{Samples: Myriad}
%\let\End\end \let\end\endinput
%\input _mrg____.exm
%\let\end\End

\section{Samples: Adobe Sans}
\let\End\end \let\end\endinput
\input zx______.exm
\let\end\End

\section{Samples: Adobe Serif}
\let\End\end \let\end\endinput
\input zy______.exm
\let\end\End


\end{document}
