.TH PS2PK 1 TeX .SH NAME ps2pk \- creates a TeX PK font from a type1 PostScript font .SH SYNOPSIS pk2pk [ \fIoptions\fP ] type1font [ \fIpkname\fP ] options: -d -v -e\fIenc\fP -X\fIxres\fP -E\fIexpansion\fP -S\fIslant\fP options: -O -P\fIpointsize\fP -Y\fIyres\fP -a\fIAFMfile\fP -R\fIbaseres\fP .de Ex .sp .RS .nf .ft C .. .de Xe .ft P .RE .sp .fi .. .SH DESCRIPTION This program renders a given type1 PostScript font at a given pointsize (default 10.0 points) and resolution (default 300dpi) into a TeX PK font. .PP To generate the PK font pk2ps needs a valid type1 fontname (for example Utopia-Regular.pfa) and its corresponding AFMfile (Utopia-Regular.afm). The program accepts both the MSDOS binary type1 format (Utopia-Regula.pfb) and its UNIX ASCII equivalent (Utopia-Regula.pfa). The resulting PK font does contain all characters for which the C-code is non negative. This can be overruled by specifying an explicit via the -e option. Character codes in AMF files are specified as integer values after the C, for example Utopia-Regular.afm provides: .Ex C 251 ; WX 601 ; N germandbls ; B 22 -12 573 742 ; C -1 ; WX 380 ; N onesuperior ; B 81 272 307 680 ; .Xe .PP The `germandbls' has code 251 and `onesuperior' -1 which means that this character is not part of the default AdobeStandardEncoding scheme. To get this `onesuperior' you have to add it to an encoding vector as described in the PostScript manuals. But of course it is better to use standard encodings, like the one provided with the new psfonts. This `TeXBase1Encoding' encoding does contain all names of characters as defined in the 256 character TeX fonts. .PP The location of files for ps2pk, since version 1.5, has been improved using PostScript resource databases. These databases can be created with mkpsres(1). On UNIX the default name is PSres.upr and can be found in directories like /usr/lib/DPS depending on the machine you are using. The following example of an UPR file contains three resources .Ex PS-Resources-1.0 Encoding FontAFM FontOutline \&. //usr/local/tex/fonts/type1faces Encoding ECEncoding=EC.enc \&. FontAFM Courier=ResidentFonts/Courier.pfa \&. FontOutline Courier=ResidentFonts/Courier.afm \&. .Xe .PP When this UPR is in the PSRESOURCEPATH ps2pk can make an EC encoded PK font for Courier with: .Ex ps2pk -eECEncoding Courier .Xe .PP It is also possible without the UPR file but then you have to set T1INPUTS to the directories containing the files you need, for example: .Ex setenv T1INPUTS /usr/local/tex/fonts/type1faces// .Xe .PP and to run ps2pk by providing the proper filenames: .Ex ps2pk -eEC.enc Courier.pfa .Xe .PP In both cases the result will be the Courier10.300pk font. .PP PostScript resource databases eliminate the need for recursive directory search, this is done by mkpsres(1) instead. And all resources can be stored in one directory per computer keeping maintenance easy. Another advantage is the mapping of internal PostScript names, which are case sensitive and not restricted to MSDOS limitations, to external platform dependant filenames in a very natural way. On a MSDOS computer psres.dpr (the equivalent of PSres.upr) could be: .Ex PS-Resources-1.0 Encoding FontAFM FontOutline \&. Encoding TeXBase1Encoding=c:\\emtex\\dvips\\8r.enc \&. FontAFM Courier=c:\\psfonts\\com_____.pfb \&. FontOutline Courier=c:\\psfonts\\afm\\com_____.afm \&. .Xe .PP Given this psres.dpr resource database .Ex ps2pk -eTeXBase1Encoding Courier .Xe .PP will create Courier10.300pk. Unfortunately MSDOS will abbreviate this name to COURIER1.300. Mkpsres(1) is an improved version of Adobe's makepsres(1) that runs on UNIX and MSDOS. This program will treat PFB fonts and PFM fonts correctly and recognize filenames ending with ".enc" as encoding vectors. .PP If the name of does not contain an explicit extension or directory separator it is considered as the name of a resource. Otherwise as a filename. You can not mix up resource names and filenames. Filenames must have an extension! .SH "Options and arguments" .IP -a\fIAFMfile\fP 12 The name of the AFM resource or file can be overruled with this option. .IP -e\fIenc\fP 12 The encoding scheme (default the encoding from the AFM file is used). .IP -E\fIextension\fP 12 The extension factor (real value, default 1.0). .IP -O 12 Create old checksums (for compatibility with old fonts). .IP -P\fIpointsize\fP 12 The desired pointsize (real value, default 10.0 points). PK fonts created with a value different to 10.0 will cause dvips warnings `dvips: Design size mismatch in font ...'. .IP -S\fIslant\fP 12 The slant (real value, default 0.0). .IP -X\fIxres\fP 12 The resolution in the X direction (integer value, default 300 dpi). .IP -Y\fIyres\fP 12 The resolution in the Y direction (integer value, default the value of \fIxres\fP). .IP -R\fIbaseres\fP 12 The base resolution (integer value, default 300 dpi). Only used for creating METAFONT compatible identification strings in PK postamble. To see the PK specials you can use `pktype PK-file | tail -20'. For example: .Ex 27828: Special: 'ps2pk options: -R600 -O -e8r.enc -E.82 -X720 -Y864' 27880: Special: 'fontid=Utopia-Regular' 27903: Special: 'codingscheme=TeXBase1Encoding' 27934: Special: 'fontfacebyte' 27948: Num special: 15335424 27953: Special: 'pixels_per_inch=600' 27974: Special: 'mag=magstep(1.0)' 27992: Special: 'aspect ratio=720 / 600' 28016: Postamble .Xe .IP -d 12 Debug flag. (Shows stat() calls during recursive path searching.) .IP -v 12 Verbose flag. (Tells what the program is doing.) .IP type1font 12 The name of the PostScript type1 font. When no explicit AFMfile is given via the -a option the name of the AFMfile will be constructed from this name by removing the extension (if supplied) and adding ".afm". .IP [pkname] 12 The name of the resulting pkfont can be overruled with this name. The default name of pkfont is derived from the basename of the type1 font, the pointsize and \fIxres\fP. For example `ps2pk -P17.28 Utopia-Regular' will result in `Utopia-Regular17.300pk'. .SH ENVIRONMENTS .IP PSRESOURCEPATH The path used for locating PS resource database files (PSres.upr on UNIX and psres.dpr on MSDOS). The default of the path will be shown by running ps2pk with the -v flag and a non-existant resource name. .IP T1INPUTS The path used for locating PS type1 fonts, their AFM files and encoding vectors. Path may contain '//' (UNIX) or '!!' (MSDOS) to force ps2pk to look into subdirectories. Using PSRESOURCEPATH instead of T1INPUTS avoids recursion. The default of the path will be shown by running ps2pk with the -v flag and a non-existant filename. .SH ACKNOWLEDGEMENTS This program uses the type1 hinting and rendering software IBM has donated to the X-consortium. .PP Since version 1.5 the lookup of PS resources as described in `Programming the Display PostScript System with X (Appendix A: Locating PostScript Resources)' from Adobe Systems is used. .SH SEE ALSO .nf `METAFONT: The Program', Donald Knuth. `The GFtoPK processor', belonging to the METAFONTware. `Adobe Font Metric Files', Version 3.0, PostScript Developer Support Group. afm2tfm(1) mkpsres(1) mtpk(1) pk2bm(1) pkfonts(1) .SH VERSIONS .nf 1.1 (May 1992) 1.3 (August 1992) 1.4 (December 1994) 1.5 (November 1995) 1.5 (Januari 1996) .SH AUTHOR .nf Piet Tutelaers rcpt@urc.tue.nl