+-------------------+ | -*- PS4MF -*- | +-------------------+ Unix-Version: 1.1 June 1996 (c) Markus Neteler 1994 - 1996 Hannover, Germany Conversion of Postscript-Type1-fonts to TeX CONTENTS I. Description II. Quality of letters III. What to do IV. Some information about .afm V. Any problems ? VI. Where to get fonts VII. New versions of ps4mfxx.zip VIII. Copyright I. DESCRIPTION In order to use Postscript-Type1-fonts for TeX without any special encoding scheme (like dc,ec,nfss) you now can convert your favourite Postscript-font. This font has to be encoded in the "AdobeStandardEncoding-scheme". After conversion into the standard-cm-encoding of TeX you can use the fonts in LaTeX 2.09. If you use LaTeX 2.e you need dc-encoding: this is also possible. This package is based on the ps2mf-package of the authors: Marcel Dings (original idea of the ps2mf-package) and Erik-Jan Vens (new ps2mf). II. QUALITY OF LETTERS Fonts made by programs like Adobe(tm), Corel's Wfnboss(tm) and Fontographer (Apple(tm)) seem to be of a better quality than fonts generated by ghostscript's getafm. If you get free or shareware-fonts you should take care of that. III. WHAT TO DO (Please read ../ps4mf/install.txt before you start!) (0) Copy your postscript-font into directory ../ps4mf. ../ stands for your home or whereever you put the package. (1) Because of two different AdobeEncodingSchemes look at .afm for the actual used encoding scheme: conv_ado.sh Adobe-made-fonts converting routine conv_east.sh east-european converting routine for special postscript-fonts conv_dc.sh dc encoding converting routine for Adobefonts (a) Fonts made by programs like Adobe(tm), Corel's Wfnboss(tm) with AdobeStandardEncoding and Fontographer (EncodingScheme AppleStandard) must be converted with conv_ado.sh -- Ado like Adobe: Typical encoding in .afm: character "grave" has got the number C 128 or C 96: "C 128 ; W ... grave ... " "C 96 ; W ... grave ... " To avoid trivial problems with syntax-error "C 175": While looking for the name of the font-generating program at .afm, check this line: C 175 ; WX 278 ; N ; B 11 33 44 566 If no charactername is specified (like here), delete this line. Otherwise you maybe won't get a metafont-file! Please read PROBLEMS (3) further down for this, too. (b) For east-europe-TeXusers I have added conv_east.sh: It generates a special encoded metafont-file (8 bit font) - please look at encoding scheme in ps2mf/east.cfg. (c) If you want to have dc-encoded fonts take conv_dc.sh If you don't find a notice of the font-generating program or don't have the character "grave" to look for the number just try both - you will just see the upper and lower letters and no accents and foreign letters etc. in your TeX document if you are wrong. Just take the better result! IMPORTANT: IF FILES .afm OR .pfb ARE MISSING: - If .afm is missing and you only have .pfm try pfm2afm to convert the .pfm -file to .afm . Look on ftp-servers for this program. - You can also take ghostscript's getafm together with t1tools/t1utils written by Thomas Wolff@inf.fu-berlin.de. (2) If necessary edit conv_ado.sh for your TeX-directory-structure. (3) Now run simply conv_ado.sh with fontname as parameter. Example: conv_ado garamond (4) Use the new font in your TeX-documents: (A) For the use of LaTeX 2.09: (You should move newfont.tex and redefint.tex from /ps4mf/texinput into the TeX-directory /usr/local/tex/texinput.) (a) By using TeX-command e.g. \newfont{\garamond}{garamond scaled 1000}. or (b) If you want to change fonts generally from computer-modern fontfamily to your favourite postscriptfonts, just declare the new fontnames in the file "newfont.tex". Then every magnification (\large, \Huge etc.) will use your postscript-font. Look at ../ps4mf/texinput/sample1.tex (LaTeX: use of newfont.tex) or ../ps4mf/texinput/sample2.tex (LaTeX: use of redefint.tex) or ../ps4mf/texinput/dingbats.tex (LaTeX: use of font dingbats) or ../ps4mf/texinput/testfont.tex (TeX: character-table) for example. (B) For the use of LaTeX 2.e (and the teTeX-package, for other packages please send a mail to me with suggestions): It seems to be somehow complicated but is rather simple... :) (a) Copy the base-file ps2mfbas.mf to: /usr/lib/teTeX/texmf/metafont/misc/ (b) Copy the (meta-)font-files *.mf (with dc-encoding) to: /usr/lib/teTeX/texmf/fonts/source/myfonts/dc/ You have to create both directories ../myfonts/dc/. (c) The *.tfm-files are created by metafont, you can ignore them. (d) The original postscript-files have to be copied, too: - the *.afm -files to: /usr/lib/teTeX/texmf/fonts/afm/myfonts/ Here you have to create the directory ../myfonts/. - the *.pfb -files also: /usr/lib/teTeX/texmf/fonts/type1/myfonts/ Here you have to create the directory ../myfonts/. (e) Now you can declare a font-family (similar to "newfont.tex" which was for LaTeX 2.09): - Change to the directory /usr/lib/teTeX/texmf/tex/latex/psnfss - Create a file called "T1xxxxx.fd" where xxxxx has to be substituted with the familyname which is defined in the first line of the file. Here you define all shapes etc. as you like it. Look further down for an example: Example for family "baskerville": T1bask.fd Content of file: \DeclareFontFamily{T1}{bask}{} \DeclareFontShape{T1}{bask}{m}{n}{ <-> baskvl }{} % medium norm. \DeclareFontShape{T1}{bask}{b}{n}{ <-> baskvlb }{} % bold norm. \DeclareFontShape{T1}{bask}{bx}{n}{ <-> baskvlb }{} % bold ext. norm. \DeclareFontShape{T1}{bask}{m}{it}{ <-> baskvli }{} % med. ital. Another example ist at ps4mf/font-definition/. (f) For the tetex-package you have to execute "texhash" at unix-prompt to tell the system that there are more files present now. (g) Now the big bang is coming ... Take you TeX-Document and add the following to the header %%%%%%%%%%%%%%%%% %[some of your definitions] \usepackage[T1]{fontenc} \renewcommand{\familydefault}{bask} % Fuer deutschsprachige AnwenderInnen zusaetzlich: \usepackage[iso]{umlaute} \usepackage{german} \selectlanguage{german} ENJOY! IV. SOME INFORMATION ABOUT .afm (1) The .afm-file contains some lines like C 168 ; WX 445 ; N dieresis ; B -9 16 455 480 ; The "C 168" is the character-number, the "WX 445" I don't know at the moment, the "N dieresis" is the name of the character, the "B -9 16 455 480" is the character bounding box information. (2) If you just have the .pfb-file you can try to create a new .afm-file with getafm.sh. Just type getafm (without extension .pfb). For getafm see above. (3) To clean up afm-files or correct characters you can use "t1tidy.zip" (ask archie or me) V. ANY PROBLEMS ? (1) utopia.zip - metafont problems! If you look into the .mf file after using conv_Gho you find many lines sprinkled randomly about the file containing only a right parenthesis " ) ". After deleting these lines Metafont runs without a problem and you now have a Utopia font. (2) If you get an error from ps2mf and afm2tfm like : B expected ; ! syntax error C 32 ; WX 278 ; N space ; ^ there is no hope to convert this font. Some part of the font-description is missing (bug of the postscript-font generating program), you have to use another font or to get it via anonymous ftp (see further down). The correct syntax at file .afm looks like C 32 ; WX 278 ; N space ; B 278 0 278 0 ; The part following "B" is necessary for ps2mf and afm2tfm. (3) No .mf file is generated: ps2mf reports an syntax-error with C 175 or similar: ! syntax error C 175 ; WX 278 ; N ; ^ The character-name is missing, just delete this line in file .afm This is an error of Corel's Wfnboss (the font-generating program). (4) You don't see any "umlauts" or other accents although there is a line e.g.: C 168 ; WX 445 ; N dieresis ; B -9 16 455 480 ; (or some other character) There is a definition at .afm but there no information in the binary file (.pfb) - get another font, blame the font-creator... (5) You get an error of afm2tfm like " Kern char not found KPX Y a -68 " Just ignore this. (6) If you have MAC-files you can try to convert them to Adobe with refont (7) Metafont-error like: " ... [89][90][91] >> -1 ! Invalid code has been replaced by 0. ; l.9067 105=:-1; I was looking for a number between 0 and 255, or for a string of length 1. Didn't find it; will use 0 instead. " Please edit /usr/local/tex/mfinput/.mf for that error: Then there are lines like ligtable 102: 105=:-1; The "-1" is unknown by metafont - delete all ligtables followed by =:-1 Then you can run metafont again. (8) It was reported that dvihplq/dvidot give checksum errors. But it is possible to print out anyway. If you take the .tfm file produced by metafont the problem will disappear (then your font won't end with character 127 but with 255 - the encoding of the first 128 characters is still like computer modern: no differences!) VI. WHERE TO GET FONTS: VI. WHERE TO GET FONTS: ----------------------- (a) To get a nice listings, character-pictures and ftp-connections of fonts try WWW with mosaic/netscape/etc.: CTAN at WWW: http://jasper.ora.com/ There is a fontpage which allows to look at fonts and download them directly! (b) You can get postscript-fonts via anonymous ftp at - ftp.uni-stuttgart.de (mirror of hobbes.nmsu.edu) /pub/systems/os2/hobbes-mirror/multimed/fonts - ftp.uni-freiburg.de /pc/os2/atmfonts - ftp obelix.icce.rug.nl /pub/erikjan/fonts/type.one.fonts /pub/erikjan/fonts/BitStream - garbo.uwasa.fi /pc/fonts - Attention: utopia.zip - metafont problems! If you look into the .mf file after using conv_gho you find several hundred lines sprinkled randomly about the file containing only a right parenthesis. When you delete these lines, Metafont runs without a problem and you now have a Utopia font. Both files .afm and .pfb are necessary. Recommended (tested) fonts: agate.zip agateb.zip agatei.zip bodoni.zip bodonib.zip bodonii.zip (change "ItalicAngle" from 1 to 16 in bodonii.afm) boecklin.zip dingbats.zip fr-n.zip (Frutiger) fr-b.zip etc. (Frutiger bold) garmnd.zip garmndmi.zip (change "ItalicAngle" from 1 to 15 in garmndmi.afm) goudyoi.zip (change "ItalicAngle" from 1 to 4 in goudyoi.afm) hobo.zip kaufmann.zip lowereas.zip (use conv_ado2.bat to convert) lowerwes.zip (use conv_ado2.bat to convert) peigmed.zip peignot.zip postcr.zip (from package atmfonts.zip, use conv_ado2.bat to convert) sntfra.zip (from package atmfonts.zip, use conv_ado2.bat to convert) utopia.zip (for fixing a simple problem look at PROBLEMS (V.1)) * ATTENTION - Fonts made by Corel's Wfnboss (that's a lot!): * * To avoid trivial problems please read PROBLEMS (V.3) above. * VII. NEW VERSIONS OF ps4mf-unix.tar.gz: ftp.rrzn.uni-hannover.de /incoming/tex VIII. COPYRIGHT: Please read copying.gnu. -------------------------------- Please get hints and comments to Markus Neteler email: neteler@geog.uni-hannover.de