diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/faq-fonts.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/faq-fonts.tex | 612 |
1 files changed, 300 insertions, 312 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/faq-fonts.tex b/Master/texmf-dist/doc/generic/FAQ-en/faq-fonts.tex index 87bb8025575..f420d621beb 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/faq-fonts.tex +++ b/Master/texmf-dist/doc/generic/FAQ-en/faq-fonts.tex @@ -1,260 +1,25 @@ -% $Id: faq-fonts.tex,v 1.8 2010/07/08 20:29:21 rf10 Exp rf10 $ +% $Id: faq-fonts.tex,v 1.12 2011/02/15 20:56:41 rf10 Exp rf10 $ \section{Fonts} -\subsection{\MF{} fonts} - -\Question[Q-useMF]{Getting \MF{} to do what you want} - -\MF{} allows you to create your own fonts, and most \TeX{} users -will never need to use it~--- modern \AllTeX{} systems contain -rather few \MF{} fonts of any significance, and when \MF{} output is -needed the font generation is done, automatically, ``on the fly''. - -If you find you have some special requirement that the system doesn't -satisfy, you need to know about \MF{} in rather more detail. \MF{}, -unlike \TeX{}, requires customisation for each output device: such -customisation is conventionally held in a ``mode'' associated with the -device. Modes are commonly defined using the \texttt{mode\_def} -convention described on page~94 of \emph{The \MF{}book} % ! line break -(see \Qref[question]{\TeX{}-related books}{Q-books}). You will need -a file, conventionally called \File{local.mf}, containing all the -\texttt{mode\_def}s you will be using. In the unlikely event that -\File{local.mf} doesn't already exist, Karl Berry's collection of -modes (\File{modes.mf}) is a good starting point -(it can be used as a `\File{local.mf}' without modification in a -typical modern implementation of \MF{}). Lists of -settings for various output devices are also published periodically in -\textsl{TUGboat} (see \Qref[question]{\acro{TUG}}{Q-TUG*}). Now create -a \texttt{plain} base file using \ProgName{mf} (in ``initialisation'' -mode), \texttt{plain.mf}, and \texttt{local.mf}: -\begin{htmlversion} -\begin{quote} -\begin{verbatim} -% mf -ini -This is METAFONT... -**plain # you type plain -(output) -*input local # you type this -(output) -*dump # you type this -Beginning to dump on file plain... -(output) -\end{verbatim} -\end{quote} -\end{htmlversion} -\htmlignore -\begin{list}{}{}\item\relax - \texttt{\% mf -ini}\\ - This is METAFONT\dots{}\\{} - \fullline{**\texttt{plain}\hss you type `\texttt{plain}'} - (\emph{output})\\{} - \fullline{*\texttt{input local}\hss you type this} - (\emph{output})\\{} - \fullline{*\texttt{dump}\hss you type this} - Beginning to dump on file plain\dots{}\\{} - (\emph{output}) -\end{list}\par -\endhtmlignore -This will create a base file named \File{plain.base} -(or something similar; for example, it will be \File{PLAIN.BAS} -on \MSDOS{} systems). Move the file to the directory containing -the base files on your system. - -Now you need to make sure \MF{} loads this new base when it starts up. If -\MF{} loads the \texttt{plain} base by default on your system, then you're -ready to go. Under Unix (using the default \texlive{} (and earlier) -distributions this does indeed happen, but we could for instance -define a command \ProgName{plainmf}% -\begin{footnoteenv} - On the grounds that a command \ProgName{plain} could be misconstrued - as a reference to \plaintex{} -\end{footnoteenv} -which executes `\texttt{mf -base=plain}' (or, in more traditional -style `\texttt{mf \&plain}') which loads the \texttt{plain} base -file. - -The usual way to create a font with \MF{} (with an appropriate base -file loaded) is to start \MF{}'s input with the -\begin{narrowversion} - lines - \begin{quote} - \csx{mode}\texttt{=<mode name>;}\\ - \texttt{mag=<magnification>;}\\ - \texttt{input <font file name>} - \end{quote} -\end{narrowversion} -\begin{wideversion} -line -\begin{verbatim} -\mode=<mode name>; mag=<magnification>; input <font file name> -\end{verbatim} -\end{wideversion} -in response to the `\texttt{**}' prompt or on the \MF{} command line. (If -\texttt{<mode name>} is unknown or omitted, the mode defaults to -`proof' mode and \MF{} will produce an output file called % ! line break -\File{<font file name>.2602gf}) -The \texttt{<magnification>} is a floating point number or -`magstep' (magsteps are defined in \emph{The \MF{}book} and -\emph{The \TeX{}book}). -If \texttt{mag=<magnification>} is omitted, then the default -is 1~(magstep 0). For example, to generate cmr10 at 12pt for an Epson -printer you might type -\begin{quote} -\begin{verbatim} -mf \mode=epson; mag=magstep 1; input cmr10 -\end{verbatim} -\end{quote} -Note that under Unix the \texttt{\textbackslash } and \texttt{;} -characters must usually be quoted or escaped, so this would typically -look something like -\begin{quote} -\begin{verbatim} - mf '\mode=epson; mag=magstep 1; input cmr10' -\end{verbatim} -\end{quote} -If you need a special mode that isn't in the base, you can put its -commands in a file (\emph{e.g.}, \File{ln03.mf}) and invoke it on the -fly with the \csx{smode} command. For example, to create -\File{cmr10.300gf} for an \acro{LN}03 printer, using the file -\begin{quote} -\begin{verbatim} -% This is ln03.mf as of 1990/02/27 -% mode_def courtesy of John Sauter -proofing:=0; -fontmaking:=1; -tracingtitles:=0; -pixels_per_inch:=300; -blacker:=0.65; -fillin:=-0.1; -o_correction:=.5; -\end{verbatim} -\end{quote} -(note the absence of the \texttt{mode\_def} and \texttt{enddef} -commands), you would type -\begin{quote} -\begin{verbatim} -mf \smode="ln03"; input cmr10 -\end{verbatim} -\end{quote} -This technique isn't one you should regularly use, but it may -prove useful if you acquire a new printer and want to experiment with -parameters, or for some other reason are regularly editing the -parameters you're using. Once you've settled on an appropriate set of -parameters, you should use them to rebuild the base file that you use. - -Other sources of help are discussed in our list of % ! line break -\Qref*{\MF{} and \MP{} Tutorials}{Q-mfptutorials}. -\begin{ctanrefs} -\item[modes.mf]\CTANref{modes-file} -\end{ctanrefs} - -\Question[Q-keepfonts]{Which font files should be kept} - -\MF{} produces from its run three files, a metrics (\acro{TFM}) file, a -generic font (\acro{GF}) file, and a log file; all of these files have the -same base name as does the input (\emph{e.g.}, if the input file was -\File{cmr10.mf}, the outputs will be \File{cmr10.tfm}, -\File{cmr10.nnngf}% -\begin{footnoteenv} - Note that the file name may be transmuted by such operating systems - as \MSDOS{}, which don't permit long file names -\end{footnoteenv} -and \File{cmr10.log}). - -For \TeX{} to use the font, you need a \acro{TFM} file, so you need -to keep that. However, you are likely to generate the same font -at more than one magnification, and each time you do so you'll -(incidentally) generate another \acro{TFM} file; these files are -all the same, so you only need to keep one of them. - -To preview or to produce printed output, the \acro{DVI} processor will need a -font raster file; this is what the \acro{GF} file provides. However, while -there used (once upon a time) to be \acro{DVI} processors that could use -\acro{GF} files, modern processors use packed raster (\acro{PK}) files. -Therefore, you need to generate a \acro{PK} file from the \acro{GF} file; the -program \ProgName{gftopk} does this for you, and once you've done that you -may throw the \acro{GF} file away. - -The log file should never need to be used, unless there was some sort -of problem in the \MF{} run, and need not be ordinarily kept. - -\Question[Q-getbitmap]{Acquiring bitmap fonts} - -When \acro{CTAN} was young, most people would start using \TeX{} -with a 300 dots-per-inch (dpi) laser printer, and sets of Computer -Modern bitmap fonts for this resolution are available on \acro{CTAN}. -(There are separate sets for write-black and write-white printers, as -well as sets at 120~dpi and 240~dpi.) - -Over the years, there have been regular requests that \acro{CTAN} should hold -a wider range of resolutions, but they were resisted for two reasons: -\begin{itemize} -\item The need to decide which printers to generate fonts for. The - broad-brush approach taken for 300~dpi printers was (more or less) - justified back then, given the dominance of certain printer - `engines', but nowadays one could not make any such assumption. -\item Given the above, justifying the space taken up by a huge array - of bitmap fonts. -\end{itemize} -Fortunately, \AllTeX{} distribution technology has put a stop to these -arguments: most (if not all) current distributions generate bitmap -fonts as needed, and cache them for later re-use. The impatient -user, who is determined that all bitmap fonts should be created once -and for all, may be supported by scripts such as \ProgName{allcm} -(distributed with \texlive{}, at least; otherwise such a -person should consult ``\Qref*{the use of \MF{}}{Q-useMF})''. - -If your output is to a \PS{}-capable device, or if your output is -destined to be converted to \acro{PDF}, you should switch to -using Type~1 versions of the \acro{CM} fonts. Two free -sets are available; the older (\Package{bakoma}) is -somewhat less well produced than the \Package{bluesky} fonts, which were -originally professionally produced and sold, but were then released -for general public use by their originators \YandY{} and Bluesky Research, -in association with the \acro{AMS} and other scientific publishers -(they are nowadays available under the SIL's Open Fonts Licence). The -two sets contain slightly different ranges of fonts, but you are -advised to use the -\Package{bluesky} set except when \Package{bakoma} is for some reason -absolutely unavoidable. In recent years, several other `\MF{}' fonts -have been converted to Type~1 format; it's common never to need to -generate bitmap fonts for any purpose other than previewing (see -% beware of line wrap -\Qref*{``previewing documents with Type~1 fonts''}{Q-PSpreview}), -if even then. - -More modern fonts may be used in place of the Computer Modern set. The -\Qref*{\acro{EC} fonts}{Q-ECfonts} and the % ! line break -\Qref*{Latin Modern fonts}{Q-uselmfonts} are both close relatives of -Computer Modern with wider ranges of glyphs to offer. -\begin{ctanrefs} -\item[\nothtml{\rmfamily}BaKoMa fonts]\CTANref{bakoma} -\item[\nothtml{\rmfamily}Bluesky fonts]Distributed as part of - \CTANref{amsfonts} -\item[\nothtml{\rmfamily}CM fonts (write-black printers)]\CTANref{pk300} -\item[\nothtml{\rmfamily}CM fonts (write-white printers)]\CTANref{pk300w} -\item[\nothtml{\rmfamily}EC fonts (Type 1 format)]\CTANref{cm-super} -\item[\nothtml{\rmfamily}Latin Modern fonts]\CTANref{lm} -\end{ctanrefs} - \subsection{Adobe Type~1 (``\PS{}'') fonts} -\Question[Q-usepsfont]{Using \PS{} fonts with \protect\TeX{}} +\Question[Q-usepsfont]{Using Adobe Type 1 fonts with \protect\TeX{}} -In order to use \PS{} fonts, \TeX{} needs -\emph{metric} (called \acro{TFM}) files. Several sets of metrics are +In order to use any font, \TeX{} needs a +\emph{metric} file (\acro{TFM} file). Several sets of metrics for +common Adobe Type 1 fonts are available from the archives; for mechanisms for generating new ones, see \Qref[question]{metrics for \PS{} fonts}{Q-metrics}. You also need the fonts themselves; \PS{} printers come with a set of -fonts built in, but to extend your repertoire you almost invariably +fonts built in, but to extend your repertoire you usually need to buy from one of the many commercial font vendors (see, for example, \Qref[question]{``choice of fonts''}{Q-psfchoice}). -If you use \LaTeXe{}, the best way to get \PS{} fonts into your -document is to use the \acro{PSNFSS} package maintained by Walter -Schmidt. The \LaTeX{}3 project team declare that \acro{PSNFSS} is -``required'', and bug reports may be submitted via the % line break +If you use \LaTeXe{}, access to your printer's fonts is offered by the +\acro{PSNFSS} package; the \LaTeX{}3 project team declare that +\acro{PSNFSS} is a ``required'' part of a \latex{} distribution, and +bug reports may be submitted via the % ! line break \Qref*{\LaTeX{} bugs system}{Q-latexbug}. \acro{PSNFSS} gives you a set of packages for changing the default roman, sans-serif and typewriter fonts; \emph{e.g}., the @@ -280,60 +45,54 @@ redefine various macros and accents, or you can use the font re-encoding mechanisms available in many drivers and in \ProgName{ps2pk} and \ProgName{afm2tfm}. -Victor Eijkhout's \Qref*{Lollipop package}{Q-lollipop} -supports declaration of font families and styles in a similar way to -\LaTeX{}'s \acro{NFSS}, and so is easy to use with \PS{} fonts. - Some common problems encountered are discussed elsewhere (see \Qref[question]{problems with \acro{PS} fonts}{Q-psfontprob}). \begin{ctanrefs} \item[Metrics for the `Laserwriter' set of 35 fonts]\CTANref{lw35nfss-zip} -\item[lollipop]\CTANref{lollipop} \item[psnfss]\CTANref{psnfss} \end{ctanrefs} \Question[Q-PSpreview]{Previewing files using Type 1 fonts} -Until recently, free \TeX{} previewers have only been capable of -displaying bitmap \acro{PK} fonts, but current versions of -\ProgName{xdvi} sport a Type~1 font renderer. -%% \YandY{}'s commercial -%% previewer \Qref*{\acro{DVIW}indo}{Q-commercial} has in the past used -%% \ProgName{Adobe} \ProgName{Type} \ProgName{Manager} to display Type~1 -%% fonts directly and now uses the system-provided font renderer -%% available in Windows~2000 and~XP. - -Other (free) previewers of the current generation offer automatic -generation of the requisite \acro{PK} files (using \ProgName{gsftopk}, -or similar, behind the scenes). If your previewer isn't capable of -this, you have three options: +Originally, free \TeX{} previewers were only capable of displaying +bitmap (\acro{PK}) fonts, but free Type~1 font rendering software has +been available for some time, and many previewers now use such +facilities. + +The alternative, for previewers, is automatic generation of the +requisite \acro{PK} files (using \ProgName{gsftopk}, or similar, +behind the scenes). + +In the unlikely event that your previewer isn't capable of either, you +have a couple options: \begin{itemize} \item Convert the \acro{DVI} file to \PS{} and use a \PS{} previewer. Some systems offer this capability as standard, but most people will need to use a separate previewer such as \ProgName{ghostscript} or \ProgName{ghostscript}-based viewers such as \ProgName{gv} or shareware offering \ProgName{GSview}. -\item Under Windows on a \acro{PC}, or on a Macintosh, let Adobe Type Manager - display the fonts (textures, on the Macintosh, works like this). -%% , and under -%% Windows you can use \YandY{}'s \ProgName{dviwindo} for bitmap-free -%% previewing. -\begin{narrowversion} % really hyper - (See \Qref[question]{}{Q-commercial} for details of these - suppliers.) -\end{narrowversion} -%\typeout{after narrowversion, before wideversion} -\begin{wideversion} - (See \Qref{commercial suppliers}{Q-commercial} for details.) -\end{wideversion} -%\typeout{after wideversion} -\item If you have the \PS{} fonts in Type~1 format, - use \ProgName{ps2pk} or \ProgName{gsftopk} - (designed for use with the \ProgName{ghostscript} fonts) to make - \acro{PK} bitmap fonts which your previewer - will understand. This can produce excellent results, also suitable - for printing with non-\PS{} devices. Check the legalities of - this if you have purchased the fonts. +% \item Under Windows on a \acro{PC}, or on a Macintosh, let Adobe Type Manager +% display the fonts (textures, on the Macintosh, works like this). +% %% , and under +% %% Windows you can use \YandY{}'s \ProgName{dviwindo} for bitmap-free +% %% previewing. +% \begin{narrowversion} % really hyper +% (See \Qref[question]{}{Q-commercial} for details of these +% suppliers.) +% \end{narrowversion} +% %\typeout{after narrowversion, before wideversion} +% \begin{wideversion} +% (See \Qref{commercial suppliers}{Q-commercial} for details.) +% \end{wideversion} +% %\typeout{after wideversion} +\item If you have the \PS{} fonts in Type~1 format, use + \ProgName{ps2pk} or \ProgName{gsftopk} (designed for use with the + \ProgName{ghostscript} fonts) to make \acro{PK} bitmap fonts which + your previewer will understand (a process similar to the way some + browsers fo the job `automatically') This can produce excellent results, + also suitable for printing with non-\PS{} devices. (Note: if you + purchased the fonts, it is advisable to check that their licence + permits you to convert them, for private use, in this way.) \end{itemize} \begin{ctanrefs} \item[ghostscript]Browse \CTANref{ghostscript} @@ -341,10 +100,9 @@ this, you have three options: \item[GSview]Browse \CTANref{gsview} \item[gv]Browse \CTANref{gv} \item[ps2pk]\CTANref{ps2pk} -\item[xdvi]\CTANref{xdvi} \end{ctanrefs} -\Question[Q-metrics]{\protect\TeX{} font metric files for \PS{} fonts} +\Question[Q-metrics]{\TeX{} font metric files for Type 1 fonts} Reputable font vendors such as Adobe supply metric files for each font, in \acro{AFM} (Adobe Font Metric) form; these can be converted @@ -759,9 +517,9 @@ working on them, and several problems have been identified: \item[pxfonts set version 1.0](26 fonts) by Young Ryu\\ The \FontName{pxfonts} set consists of \begin{itemize} - \item virtual text fonts using \FontName{Adobe} \FontName{Palatino} (or the \acro{URW} - replacement used by \ProgName{ghostscript}) with modified plus, - equal and slash symbols; + \item virtual text fonts using \FontName{Adobe} \FontName{Palatino} + (or the \acro{URW} replacement used by \ProgName{ghostscript}) + with modified plus, equal and slash symbols; \item maths alphabets using \FontName{Palatino}; \item maths fonts of all symbols in the computer modern maths fonts (\FontName{cmsy}, \FontName{cmmi}, \FontName{cmex} and the Greek @@ -777,14 +535,11 @@ working on them, and several problems have been identified: \FontName{txfonts} set should be installed whenever \FontName{pxfonts} are. \LaTeX{}, \ProgName{dvips} and \PDFTeX{} support files are included. -\begin{narrowversion} % really non-hyper version - Documentation - (\URL{http://mirrors.ctan.org/fonts/pxfonts/doc/pxfontsdocA4.pdf}) -\end{narrowversion} -\begin{wideversion} - \href{http://mirrors.ctan.org/fonts/pxfonts/doc/pxfontsdocA4.pdf}{Documentation} -\end{wideversion} - is readily available. + + The fonts are not perfect; the widths assigned to the characters in + the \extension{tfm} file are wrong for some glyphs; this can cause + sequences of characters to ``look wrong'', or in some cases even to + overlap. The fonts are licensed under the \acro{GPL}; use in published documents is permitted. @@ -805,14 +560,11 @@ working on them, and several problems have been identified: \end{itemize} The text fonts are available in \acro{OT}1, \acro{T}1 and \acro{LY}1 encodings, and \acro{TS} encoded symbols are also available. -\begin{narrowversion} % really non-hyper version - Documentation - (\URL{http://mirrors.ctan.org/fonts/txfonts/doc/txfontsdocA4.pdf}) -\end{narrowversion} -\begin{wideversion} - \href{http://mirrors.ctan.org/fonts/txfonts/doc/txfontsdocA4.pdf}{Documentation} -\end{wideversion} - is readily available. + + The fonts are not perfect; the widths assigned to the characters in + the \extension{tfm} file are wrong for some glyphs; this can cause + sequences of characters to ``look wrong'', or in some cases even to + overlap. The fonts are licensed under the \acro{GPL}; use in published documents is permitted. @@ -820,13 +572,13 @@ working on them, and several problems have been identified: The \ProgName{txfontsb} bundles \ProgName{txfonts}, extended to provide a Small Caps set, Old-Style numbers and Greek text (from the GNU Freefont set). -\begin{narrowversion} % really non-hyper version +\begin{flatversion} Documentation (\URL{http://mirrors.ctan.org/fonts/txfontsb/doc/txfontsb/txfontsb.pdf}) -\end{narrowversion} -\begin{wideversion} +\end{flatversion} +\begin{hyperversion} \href{http://mirrors.ctan.org/fonts/txfontsb/doc/txfontsb/txfontsb.pdf}{Documentation} -\end{wideversion} +\end{hyperversion} is available for this variant, too. \end{booklist} Finally, one must not forget: @@ -854,12 +606,14 @@ The fonts may not render well (or at all, under \acro{ATM}), may not have the `standard' complement of 228 glyphs, or may not include metric files (which you need to make \acro{TFM} files). -TrueType remains the ``native'' format for Windows. Some \TeX{} +\ttype{} was for a long time the ``native'' format for Windows, but +MicroSoft joined the development of the \otype{} specification, and +`modern' windows will work happily with fonts in either format. Some \TeX{} implementations such as \Qref*{True\TeX{}}{Q-commercial} use TrueType versions of Computer Modern and Times Maths fonts to render \TeX{} documents in Windows without the need for additional system software like -\acro{ATM}. (When used on a system running Windows~XP, True\TeX{} can -also use Type~1 fonts.) +\acro{ATM}. (When used on a system running Windows~XP or later, +True\TeX{} can also use Adobe Type~1 fonts.) When choosing fonts, your own system environment may not be the only one of interest. If you will be sending your finished documents to others for @@ -1172,3 +926,237 @@ no support for using fonts according to the \acro{OT}1 encoding. \item[\nothtml{\rmfamily}Latin Modern fonts]\CTANref{lm} \end{ctanrefs} +\subsection{\MF{} fonts} + +\Question[Q-useMF]{Getting \MF{} to do what you want} + +\MF{} allows you to create your own fonts, and most \TeX{} users +will never need to use it~--- modern \AllTeX{} systems contain +rather few \MF{} fonts of any significance, and when \MF{} output is +needed the font generation is done, automatically, ``on the fly''. + +If you find you have some special requirement that the system doesn't +satisfy, you need to know about \MF{} in rather more detail. \MF{}, +unlike \TeX{}, requires customisation for each output device: such +customisation is conventionally held in a ``mode'' associated with the +device. Modes are commonly defined using the \texttt{mode\_def} +convention described on page~94 of \emph{The \MF{}book} % ! line break +(see \Qref[question]{\TeX{}-related books}{Q-books}). You will need +a file, conventionally called \File{local.mf}, containing all the +\texttt{mode\_def}s you will be using. In the unlikely event that +\File{local.mf} doesn't already exist, Karl Berry's collection of +modes (\File{modes.mf}) is a good starting point +(it can be used as a `\File{local.mf}' without modification in a +typical modern implementation of \MF{}). Lists of +settings for various output devices are also published periodically in +\textsl{TUGboat} (see \Qref[question]{\acro{TUG}}{Q-TUG*}). Now create +a \texttt{plain} base file using \ProgName{mf} (in ``initialisation'' +mode), \texttt{plain.mf}, and \texttt{local.mf}: +\begin{htmlversion} +\begin{quote} +\begin{verbatim} +% mf -ini +This is METAFONT... +**plain # you type plain +(output) +*input local # you type this +(output) +*dump # you type this +Beginning to dump on file plain... +(output) +\end{verbatim} +\end{quote} +\end{htmlversion} +\htmlignore +\begin{list}{}{}\item\relax + \texttt{\% mf -ini}\\ + This is METAFONT\dots{}\\{} + \fullline{**\texttt{plain}\hss you type `\texttt{plain}'} + (\emph{output})\\{} + \fullline{*\texttt{input local}\hss you type this} + (\emph{output})\\{} + \fullline{*\texttt{dump}\hss you type this} + Beginning to dump on file plain\dots{}\\{} + (\emph{output}) +\end{list}\par +\endhtmlignore +This will create a base file named \File{plain.base} +(or something similar; for example, it will be \File{PLAIN.BAS} +on \MSDOS{} systems). Move the file to the directory containing +the base files on your system. + +Now you need to make sure \MF{} loads this new base when it starts up. If +\MF{} loads the \texttt{plain} base by default on your system, then you're +ready to go. Under Unix (using the default \texlive{} (and earlier) +distributions this does indeed happen, but we could for instance +define a command \ProgName{plainmf}% +\begin{footnoteenv} + On the grounds that a command \ProgName{plain} could be misconstrued + as a reference to \plaintex{} +\end{footnoteenv} +which executes `\texttt{mf -base=plain}' (or, in more traditional +style `\texttt{mf \&plain}') which loads the \texttt{plain} base +file. + +The usual way to create a font with \MF{} (with an appropriate base +file loaded) is to start \MF{}'s input with the +\begin{narrowversion} + lines + \begin{quote} + \csx{mode}\texttt{=<mode name>;}\\ + \texttt{mag=<magnification>;}\\ + \texttt{input <font file name>} + \end{quote} +\end{narrowversion} +\begin{wideversion} +line +\begin{verbatim} +\mode=<mode name>; mag=<magnification>; input <font file name> +\end{verbatim} +\end{wideversion} +in response to the `\texttt{**}' prompt or on the \MF{} command line. (If +\texttt{<mode name>} is unknown or omitted, the mode defaults to +`proof' mode and \MF{} will produce an output file called % ! line break +\File{<font file name>.2602gf}) +The \texttt{<magnification>} is a floating point number or +`magstep' (magsteps are defined in \emph{The \MF{}book} and +\emph{The \TeX{}book}). +If \texttt{mag=<magnification>} is omitted, then the default +is 1~(magstep 0). For example, to generate cmr10 at 12pt for an Epson +printer you might type +\begin{quote} +\begin{verbatim} +mf \mode=epson; mag=magstep 1; input cmr10 +\end{verbatim} +\end{quote} +Note that under Unix the \texttt{\textbackslash } and \texttt{;} +characters must usually be quoted or escaped, so this would typically +look something like +\begin{quote} +\begin{verbatim} + mf '\mode=epson; mag=magstep 1; input cmr10' +\end{verbatim} +\end{quote} +If you need a special mode that isn't in the base, you can put its +commands in a file (\emph{e.g.}, \File{ln03.mf}) and invoke it on the +fly with the \csx{smode} command. For example, to create +\File{cmr10.300gf} for an \acro{LN}03 printer, using the file +\begin{quote} +\begin{verbatim} +% This is ln03.mf as of 1990/02/27 +% mode_def courtesy of John Sauter +proofing:=0; +fontmaking:=1; +tracingtitles:=0; +pixels_per_inch:=300; +blacker:=0.65; +fillin:=-0.1; +o_correction:=.5; +\end{verbatim} +\end{quote} +(note the absence of the \texttt{mode\_def} and \texttt{enddef} +commands), you would type +\begin{quote} +\begin{verbatim} +mf \smode="ln03"; input cmr10 +\end{verbatim} +\end{quote} +This technique isn't one you should regularly use, but it may +prove useful if you acquire a new printer and want to experiment with +parameters, or for some other reason are regularly editing the +parameters you're using. Once you've settled on an appropriate set of +parameters, you should use them to rebuild the base file that you use. + +Other sources of help are discussed in our list of % ! line break +\Qref*{\MF{} and \MP{} Tutorials}{Q-mfptutorials}. +\begin{ctanrefs} +\item[modes.mf]\CTANref{modes-file} +\end{ctanrefs} + +\Question[Q-keepfonts]{Which font files should be kept} + +\MF{} produces from its run three files, a metrics (\acro{TFM}) file, a +generic font (\acro{GF}) file, and a log file; all of these files have the +same base name as does the input (\emph{e.g.}, if the input file was +\File{cmr10.mf}, the outputs will be \File{cmr10.tfm}, +\File{cmr10.nnngf}% +\begin{footnoteenv} + Note that the file name may be transmuted by such operating systems + as \MSDOS{}, which don't permit long file names +\end{footnoteenv} +and \File{cmr10.log}). + +For \TeX{} to use the font, you need a \acro{TFM} file, so you need +to keep that. However, you are likely to generate the same font +at more than one magnification, and each time you do so you'll +(incidentally) generate another \acro{TFM} file; these files are +all the same, so you only need to keep one of them. + +To preview or to produce printed output, the \acro{DVI} processor will need a +font raster file; this is what the \acro{GF} file provides. However, while +there used (once upon a time) to be \acro{DVI} processors that could use +\acro{GF} files, modern processors use packed raster (\acro{PK}) files. +Therefore, you need to generate a \acro{PK} file from the \acro{GF} file; the +program \ProgName{gftopk} does this for you, and once you've done that you +may throw the \acro{GF} file away. + +The log file should never need to be used, unless there was some sort +of problem in the \MF{} run, and need not be ordinarily kept. + +\Question[Q-getbitmap]{Acquiring bitmap fonts} + +When \acro{CTAN} was young, most people would start using \TeX{} +with a 300 dots-per-inch (dpi) laser printer, and sets of Computer +Modern bitmap fonts for this resolution are available on \acro{CTAN}. +(There are separate sets for write-black and write-white printers, as +well as sets at 120~dpi and 240~dpi.) + +Over the years, there have been regular requests that \acro{CTAN} should hold +a wider range of resolutions, but they were resisted for two reasons: +\begin{itemize} +\item The need to decide which printers to generate fonts for. The + broad-brush approach taken for 300~dpi printers was (more or less) + justified back then, given the dominance of certain printer + `engines', but nowadays one could not make any such assumption. +\item Given the above, justifying the space taken up by a huge array + of bitmap fonts. +\end{itemize} +Fortunately, \AllTeX{} distribution technology has put a stop to these +arguments: most (if not all) current distributions generate bitmap +fonts as needed, and cache them for later re-use. The impatient +user, who is determined that all bitmap fonts should be created once +and for all, may be supported by scripts such as \ProgName{allcm} +(distributed with \texlive{}, at least; otherwise such a +person should consult ``\Qref*{the use of \MF{}}{Q-useMF})''. + +If your output is to a \PS{}-capable device, or if your output is +destined to be converted to \acro{PDF}, you should switch to +using Type~1 versions of the \acro{CM} fonts. Two free +sets are available; the older (\Package{bakoma}) is +somewhat less well produced than the \Package{bluesky} fonts, which were +originally professionally produced and sold, but were then released +for general public use by their originators \YandY{} and Bluesky Research, +in association with the \acro{AMS} and other scientific publishers +(they are nowadays available under the SIL's Open Fonts Licence). The +two sets contain slightly different ranges of fonts, but you are +advised to use the \Package{bluesky} set except when \Package{bakoma} +is for some reason absolutely unavoidable. In recent years, several +other `\MF{}' fonts have been converted to Type~1 format; it's +uncommon ever to need to generate bitmap fonts for any purpose other +than previewing (see % ! line wrap +\Qref*{``previewing documents with Type~1 fonts''}{Q-PSpreview}), +if even then. + +More modern fonts may be used in place of the Computer Modern set. The +\Qref*{\acro{EC} fonts}{Q-ECfonts} and the % ! line break +\Qref*{Latin Modern fonts}{Q-uselmfonts} are both close relatives with +wider ranges of glyphs to offer. +\begin{ctanrefs} +\item[\nothtml{\rmfamily}BaKoMa fonts]\CTANref{bakoma} +\item[\nothtml{\rmfamily}Bluesky fonts]Distributed as part of + \CTANref{amsfonts} +\item[\nothtml{\rmfamily}CM fonts (write-black printers)]\CTANref{pk300} +\item[\nothtml{\rmfamily}CM fonts (write-white printers)]\CTANref{pk300w} +\item[\nothtml{\rmfamily}EC fonts (Type 1 format)]\CTANref{cm-super} +\item[\nothtml{\rmfamily}Latin Modern fonts]\CTANref{lm} +\end{ctanrefs} |