TEX (not LATEX) and type 1 fonts for UNIX |
|
Step 1 |
Get the type 1 fonts. These are also referred to as PostScript fonts. For example, if the font is Salsa, you should get the following files:
|
Step 2 |
Install the fonts. Make any directory of your choice for the "tfm" and "pfa" files. Assume you use /home/tfm for the "tfm" files and /home/pfa for the "pfa" files. You don't need the "afm" and "pfb" files any longer but do not throw them out--they may be useful in other applications. |
Step 3 |
Tell TEX where the tfm files are. TEX only needs the tfm file. It does not require the font, as TEX only places empty boxes on a page. It just needs to know the sizes and placement of these boxes. We use an environment variable TEXFONTS set as follows: setenv TEXFONTS .:/home/tfm:other-directories-separated-by-colonsMake sure that all TFM directories are in this list. There should be TFM directories in the font area of your TEX fonts. Places like /usr/local/share/texmf/fonts/tfm or /usr/lib/texmf/fonts/cm/sauter/tfm. Check your computer for this. The "setenv" command can be given once, just before you "tex" a file, or it can be given in a startup file such as your .cshrc file (this is what I do). |
Step 4 |
Tell dvips that you have the type 1 font. DVIPS, which is in charge of taking the TEX output, a dvi file, and replacing the empty boxes by actual characters from a font, among other things, needs to know that you are supplying the font. This is done through a file in your home directory, called ".dvipsrc". Mine looks like this: f M localfont m 6000000 D 600 R 100 120 144 300 360 400 432 480 600 648 720 T .:/home/luc/tfm:/usr/local/share/texmf/fonts/tfm P .:/ps/tex/pk:/usr/local/share/texmf/fonts/pk H .:/usr/local/tex3.0/lib/ps p /home/luc/fontlistPlease don't copy this if you don't know what you are doing. The D line establishes the dpi of the printer (only needed if you use metafont--irrelevant for type 1 fonts). The R line gives the sizes of the bitmap fonts needed if metafont is fired up. Again, not needed for type 1, but it is safe to keep this line there. The T line gives the directories where tfm files may be found. The P line gives directories for the PK files (not needed for type 1). The p line finally gives a filename that has all the type 1 fonts. It lists one font name per line, as in cmr10 Salsa Salsa-Outline Salsa-Italic Salsa-Swash CourierYou can place that file (in my case /home/luc/fontlist) anywhere. |
Step 5 |
Within the TEX file. First, you need to set the various fonts to be used in your text. Here is an example declaration: \font\rm=GaramondRepriseSSi at 11pt \font\it=GaramondRepriseSSi-Italic at 11pt \font\bf=GaramondRepriseSSi-Bold at 11pt \font\bi=GaramondRepriseSSi-BoldItalic at 11pt \font\sc=GaramondRepriseSSi-SmallCaps at 11pt \font\osf=GaramondRepriseSSi-ItalicOldStyleFigures at 11pt \font\bsc=GaramondRepriseSSi-BoldSmallCaps at 11pt \font\bosf=GaramondRepriseSSi-BoldItalicOldStyleFigur at 11pt \font\mini=GaramondRepriseSSi at 10ptThis permits you to use, in the body of the text, phrases such as \rm One should {\it never} use {\bf bold} typefaces in running text, but use {\it italics} instead. Words like {\sc nasa} and {\sc cia} should be set in small caps, and dates such as {\osf 1999} are better set in old style figure fonts. |
Step 6 |
TEX and DVIPS. You are now ready to TEX/DVIPS. It is most convenient to do this in a shell file. A simple script like this is useful: filename=$1 # ..... argument is the filename to be TEXed without TEX extension outputfile=robinhood # ..... base of all output files tex $filename.tex # ..... TEX away! dvips -h /home/pfa/Salsa.pfa\ -h /home/pfa/Salsa-Swash.pfa\ -o $outputfile.ps $filename # ..... dvips grabs the font files whose paths are # ......given in full following the "-h" header command ps2pdf $outputfile.ps $outputfile.pdf # ..... if you need a PDF file on the fly and have # ..... ghostscript installed |
Contact |
Luc Devroye |