% \iffalse % % This file is part of the NFSS2 (New Font Selection Scheme) package. % ------------------------------------------------------------------ % % This file was contributed. In case of error please inform the % original author. % % \fi \def\fileversion{4.0} \def\filedate{5.05.93} % % This document describes an NFSS2 setup which declares PostScript % fonts, and the associated style files % \def\SLiTeX{S\kern-.065em L\kern-.18em\raise.32ex\hbox{i}\kern-.03em\TeX} % PiCTeX Documentation from the PiCTeX Files \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \def\PiCTeX{\PiC\kern-.11em\TeX} \def\PS{{\sc PostScript}} \documentstyle[]{article} \begin{document} \title{Notes on setup of the New Font Selection Scheme 2 to use PostScript fonts} \author{Sebastian Rahtz} \date{\filedate} \maketitle % \tableofcontents \section{Introduction} This set of files offers a complete working setup of NFSS2 for use with \PS\ fonts; it is based on the system I created between 1989 and 1991 for Southampton Computer Science, checked and updated for NFSS2. Style options are provided for the common PostScript fonts. You should be familiar with the standard NFSS2 files and their use to follow this document. I assume that you have all the NFSS2 files and a recent copy of the normal \LaTeX\ distribution. Style files are offered to set documents in the common PostScript fonts, plus exotica like Lucida Maths. Lucida Bright is also supported. It is assumed that the user uses a driver which understands virtual fonts, and that Karl Berry's naming scheme is followed. {\bf NOTE:} I have included {\em new} font metric and virtual font files for PostScript fonts, for those who wish to use EC encoding. These will only work if you use dvips. \section{Portability} My personal setup uses a \PS\ printer, Karl Berry's names for \PS\ fonts in \TeX, virtual fonts to map \PS\ to CMR layout, and I process my \verb|.dvi| files with Rokicki's dvips. Other systems may fall over. \section{Standard installation} This distribution is provided as a set of \verb|.dtx| and \verb|.fdd| files which need to be unpacked using {\em docstrip} to create user files. There are two types of file which result: \begin{enumerate} \item \verb|.fd| files which describe a particular font encoding/family combination \item \verb|.sty| files which change the font defaults to use some new group of fonts \end{enumerate} Scripts are provided for {\em docstrip} in the form of four {\tt .ins} files, which simply need to be run through \TeX; when that has been done, install all the {\tt .sty} and {\tt .fd} files that result in a directory where \LaTeX\ will find them. But wait! Before you start installing, you have an important decision to make --- are you going to use fonts encoded in the `Cork' layout, or the old ones which look like the CM fonts described in the \TeX\ book? This affects how you run the installation scripts you run. To get PostScript fonts in the Cork (EC) layout, you will need to use Rokicki's {\tt dvips} driver, which knows how to ask the PostScript interpreter to recode the fonts. This manual will not attempt to explain why you should or should not use EC fonts\ldots Run \TeX\ on the file {\tt psfonts.ins}, and answer either `c' (Cork), `o' (Old), or `b' (Both) when asked about encoding. The latter option will create {\em two} sets of {\tt .fd} files, one for Cork-encoding, the other for old \TeX\ encoding, and you will be asked which your default will be. Font description files ({\tt .fd}) will be created for all the standard PostScript fonts, and some style files (see below for names). If you follow the Cork-encoding route, you need different \TeX\ font metric files and virtual font files. Suitable files for the standard 35 fonts are included in the {\tt metrics} sub-directory, where you will also find a Unix-style `Makefile' which shows how to create suitable metrics for extra Type1 fonts you may have. You will need to be able to compile the program {\tt vpltovpl} to make this work. It is written in fairly portable C. As well as different metrics, EC-encoded fonts need slightly different entries in the {\tt psfonts.map} file of dvips, such as: \begin{verbatim} pagko0 AvantGarde-BookOblique " ECEncoding ReEncodeFont " pplr}{} \DeclareFontShape{OT1}{ppl}{m}{it}{<->pplri}{} \DeclareFontShape{OT1}{ppl}{b}{n}{<->pplb}{} \DeclareFontShape{OT1}{ppl}{b}{it}{<->pplbi}{} \DeclareFontShape{OT1}{ppl}{m}{sc}{<->pplrc}{} \DeclareFontShape{OT1}{ppl}{m}{sl}{<->pplro}{} % \DeclareFontShape{OT1}{ppl}{b}{sc}{<->sub * ppl/m/sc}{} \DeclareFontShape{OT1}{ppl}{b}{sl}{<->sub * ppl/b/it}{} \DeclareFontShape{OT1}{ppl}{bx}{n}{<->sub * ppl/b/n}{} \DeclareFontShape{OT1}{ppl}{bx}{it}{<->sub * ppl/b/it}{} \DeclareFontShape{OT1}{ppl}{bx}{sc}{<->sub * ppl/m/sc}{} \DeclareFontShape{OT1}{ppl}{bx}{sl}{<->sub * ppl/m/sl}{} \endinput \end{verbatim} Once the font family and encoding is declared (I use the three-letter unique combinations devised by Karl Berry for all PostScript fonts), each combination of series and style is mapped to the name of a {\tt tfm} file; we don't need to worry about which sizes are available, because the PostScript fonts can be scaled to any size. The second part of the file sets up some substitutions for situations where we may have no font available (bold small caps, bold slanted, or bold-extended series). If you need to create a new style file which can be used in the same way as the ones provided, simply use standard NFSS2 constructs. This is {\tt nftimes.sty} (with banner information removed): \begin{verbatim} \@ifundefined{DeclareFontShape} {\@ifundefined{selectfont} {\@latexerr{This style option can only be used with the new^^Jfont selection scheme}\@eha} {\@latexerr{This style option can only be used with the new^^Jfont selection scheme *release 2*} {Your format contains NFSS release 1, but this style option was^^Jdeveloped for release 2.} } \endinput} {} \renewcommand{\sfdefault}{phv} \renewcommand{\rmdefault}{ptm} \renewcommand{\ttdefault}{pcr} \def\bfdefault{b} \endinput \end{verbatim} Note the test to see whether we are actually using NFSS2 and the switch to make `b' default for bold rather than `bx'. If appropriate you could \verb|\input| the style files described above, and use the utility macros to tailor your environment. \section*{Appendix: font names} \begin{tabular}{|ll|} \hline Family name & Full name\\ \hline pag&Adobe AvantGarde\\ pbe&Adobe MBembo\\ pbk&Adobe Bookman\\ pcr&Adobe Courier\\ phv&Adobe Helvetica\\ pnc&Adobe NewCenturySchoolbook\\ ppl&Adobe Palatino\\ ptm&Adobe Times Roman\\ pzc&Adobe ZapfChancery\\ psy&Adobe Symbol font\\ pzd&Adobe Zapf Dingbats\\ \hline hlc&B\&H Lucida Bright\\ hlcs&B\&H Lucida Sans\\ hlct&B\&H Lucida Bright Typewriter\\ mgm&Monotype Garamond\\ mim&Monotype Imprint\\ mpi&Monotype Plantin\\ mnp&Monotype NewsPlantin\\ mnt&Monotype Times New Roman\\ mpp&Monotype Perpetua\\ pgm&Adobe ITC Garamond\\ pgs&Adobe MGillSans\\ plc&Adobe Lucida\\ plcs&Adobe Lucida Sans\\ pnb&NewBaskerville\\ pop&Adobe Optima\\ pun&Adobe Univers\\ \hline \end{tabular} \end{document}