
Bijlage D Postscript fonts in TEX 139 Postscript fonts in TEX Phons Bloemen [email protected] Abstract A guide through the jungle of installing and using PostScript and other types of fonts in TEX. The installation of the font is discussed, and it is shown how to use the fonts in an automatic font generation scheme. 1 Types of fonts Windows Truetype This font format is found on MS- When searching for another set of fonts than the usual DOS computers running MS Windows, or Macin- Computer Modern, one encounters a variety of other fonts tosh computers. There are currently no tools to to choose from. Some of them are easy to handle for convert these for use by TEX. However, most of the fonts in TrueType format are also available in TEX, others create more dif®culties. The various fonts may be classi®ed according to the format in which they PostScript format. appear. Most PostScript fonts are commercial (like the `standard MET A `Real' METAFONT These are fonts created with - 35 PostScript fonts'), and .pfa/.pfb ®les of them are FO N T , and exploit its capabilities. In other words, not to be found on public ®le servers like CTAN.Some these fonts contain different designs for different font suppliers have put one of their creations in the public sizes. The most prominent example of this kind is domain, like Bitstream Charter and Adobe Utopia. CD- Computer Modern. ROM versions of Corel Draw contain several PostScript MET A `Fake' MET A F O N T These fonts are created with - fonts. Public domain PostScript fonts, of varying quality, FO N T , but only in a single design size. Other sizes can be found at ftp.cica.indiana.edu or its mirror are created by magnifying the design. Examples are ftp.nlnet.nl. Malvern and the German fonts of Yannis Haralam- bous. After the choice is made, and the font ®les are obtained, Postscript A large collection of fonts are in PostScript for- they must be installed on the system. mat, or `Adobe type 1' format. A PostScript font is Install the font such that TEX recognizes it: create the designed for a single design size. When other sizes .tfm ®les. are needed, magni®cation takes place. PostScript Create a style ®le to use the font in LATEX: create the fonts come in .pfa or .pfb ®les, which contain .sty and .fd ®les. the character glyphs. The .pfa ®les are 7bit ASCII Set up the previewer to display the font: create the .pk ®les, they are mainly used on Unix systems. The ®les. .pfb ®le is an 8bit ®le format, found on MS-DOS Implement automatic font generation. machines. Each PostScript font is accompanied by Instruct the printer driver how to process the font. an .afm ®le, which contains information about the sizes of the characters. Ghostscript The `35 standard PostScript fonts' are also 2 Previewing available in a .gsf format. This format was in- Previewing is an important step in creating TEX documents, troduced by Ghostscript. In order to distribute and a lot of effort has been put in creating comfortable soft- Ghostscript as a useful program, the 35 fonts had to ware to preview .dvi ®les. Previewers of choice are xdvi be supplied, without infringingAdobe's copyrights. on Unix platforms, and dviscr (from emTEX) on MS- This was done by creating them again: the .gsf DOS platforms. dviscr/xdvi use .pk font ®les when ®les. However, the quality of these .gsf fonts is previewing a document: there must be .pk ®les available very poor. Ghostscript is able to use real PostScript in different sizes of each font. Usually, they are stored using fonts, when they are available. ®lenames like cmr10.300pk or 300dpi/cmr10.pk. HP softfonts Again, a large amount of fonts is distributed They may also be stored in a font library,a®leformat in a format suitable for downloading into HP Laser- (.fli) introduced by emTEX. jet printers. They can be converted for use by TEX, with utilities like sfptopk, hptfm2pl.How 2.1 Automatic font generation this is done is not discussed here. An important option of the previewers is automatic font generation. When the previewer can not ®nd a particular Dutch TEX Users Group (NTG), P.O. Box 394, 1740 AJ Schagen, The Netherlands Reprint MAPS#13 (94.2); Nov 1994 140 Postscript fonts in TEX Bijlage D .pk ®le, it can spawn a subprocess to create it. On Unix, ing xdvi/dviscr. The newest version of xdvi this usually is a shell script called MakeTeXPK.OnMS- (v1.18) is even able to preview .eps pictures, by call- DOS, there is a program mfjob.exe which performs this ing Ghostscript. task. The subprocess investigates which size of the missing Before we discuss how to set up automatic font genera- font is to be generated, and then calls MET A F O N T with the appropriate parameters. In order to get this scheme work- tion using ps2pk, and how to install the fonts for use by ing, there must be a .tfm and a .mf ®le available for each dvips, ®rst something about font names. font. Using automatic font generation has advantages above the 3 Font names and encodings use of a ®xed set of fonts or font libraries: there are no As TEX runs on virtually every platform, a naming sheme problems anymore when some odd size of a rare font is for ®lenames must be used which runs on every platform. needed. No more ugly substitutions! Another bonus is less Since every platform has different conventions, the least use of disk space: It is not necessary to have a full set of common denominator must be used: this means there are 8 all possible magsteps of Computer Modern `online'. Fonts characters available for a ®le name, without an extension. are created when they are needed, and from time to time The ®le name is case insensitive, and only letters and nu- the directory tree containing the .pk ®les can be deleted merals may be used: this adds up to 36 possibilities per to free disk space. character position. 3.1 The Berry names 2.2 Previewing PostScript fonts In [1], Karl Berry proposes a naming scheme for font ®les When PostScript fonts are to be previewed, there are four matching the restrictions above. The eight characters are possibilities to get them on the screen. divided as follows: dvidrv, xdvi is used. There is no way of convert- ing a PostScript font to a .pk ®le, and a substitution is STTWVEDD used. This solution is clearly not satisfactory. MET A F O N T The PostScript font is converted to .There S represents the source of the font, and is omitted if is a program ps2mf by Erik-Jan Vens [4], which con- the source is unknown or irrelevant. Usually, the verts a PostScript font in .pfa form to a MET A F O N T source is a company selling fonts, called a foundry. ®le. The .tfm ®le necessary for TEX and automatic Different sources can supply the same typeface. font generation can be created by running MET A F O N T . TT represents the typeface name. There is space for The resulting .mf ®les are rather large: in the order 36 * 36 = 1296 different typefaces in this nam- of 300 kb per font. A MET A F O N T with a high ca- ing scheme. When the font naming scheme was pacity (bigMET A F O N T )mustbeusedtoprocessthem. ®rst presented, this was not judged such a prob- The advantage is that the favorite previewer still can be lem. However, there are many more typefaces in used. the world. See, for instance, [3]2 which contains The use of xdvi/dviscr is abandoned. The .dvi samples of 700 fonts. ®le is converted to a Postscript .ps ®le by dvips.The W represents the weight, or `boldness'. PostScript ®le is then previewed with Ghostscript. The V represents the variant, and is omitted if both it and advantage of this scheme is that there is no extra setup the width are `normal'. Many fonts have more than required for previewing. Yes, dvips must be installed one variant. In this case, Berry proposes to give (and this may cause some problems), but the documents the variant letters in alphabetical order. Some fonts are to be printed on a PostScript printer anyway1 .Al- have so many variants that they exhaust the 8 char- most all versions of Ghostscript have the abilityto show acter name space. The variant representation is the the page on the screen (using X11 or VGA graphics), weak point of the naming scheme. but the user interface of Ghostscript is not very friendly. E represents the width (`expansion'), and is omitted if This problem is solved by ghostview for X11 and it is `normal'. gsview for MS Windows. However, these two pre- DD represents the design size. One or two numerals are viewers are not as easy to use as xdvi/dviscr,an used, so fonts of design sizes between 1 and 99pt extra conversion step by dvips is needed to preview, can be named. Very big fonts with design sizes and the previewing is slower. above 100pt do exist.... The design size is omitted The last option (and IMHO the best) is the use of if the font is linearly scaled from a single .tfm ®le, ps2pk by Piet Tutelaars. ps2pk can convert a Post- which is the case when using PostScript fonts, and Script form directly into .pk format.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-