1. NAME

pfm2kpx - extract correct kerning information from pfm (Printer Font Metrics) files

2. SYNOPSIS

pfm2kpx [options] pfm

3. DESCRIPTION

Many PostScript Type1 fonts contain only pfb and pfm files, but no afm (Adobe Font Metrics) files. These can be generated with pf2afm (which comes with GhostScript), but this might not yield all kerning pairs from the pfm file. The reason for this is that pf2afm interprets \f(CW\*(C`dfCharSet = 0x00\*(C'\fR to mean that the Adobe StandardEncoding has been used, whereas many fonts (or font creation tools) instead use the Windows ANSI (aka codepage 1252) encoding. (You know you've hit this problem when pf2afm complains "\f(CW\*(C`.notdef character ocurred among kern pairs -- you'd better check the resulting AFM file\*(C'\fR".) In this case, the resulting afm is incomplete and contains wrong kerning pairs.

pfm2kpx extracts the correct kerning pairs from such pfm files and repairs the afm (if necessary creating it first by running pf2afm). If for some reason it can't update the afm, it prints the kerning pairs to \f(CW\*(C`stdout\*(C'\fR instead.

When pf2afm doesn't complain about the kerning pairs, pfm2kpx thinks the resulting afm file is fine and quits; this can be changed by specifying the -f option (see below).

4. OPTIONS

-f 4 Force updating of the afm file, even if pf2afm doesn't complain.

5. SEE ALSO

pf2afm (part of GhostScript), afm2afm, autoinst, cmap2enc, font2afm, ot2kpx.

6. AUTHOR

Marc Penninga <>

7. HISTORY

2005-02-17 12 First version

2005-02-18 12 Added \f(CW\*(C`binmode PFM\*(C'\fR to make pfm2kpx work on Windows platforms

2005-03-08 12 Input files searched via kpsewhich (where available)

2005-03-14 12 Rewrote some of the code to make it more robust, added the -f option

2005-03-15 12 Input files searched using kpsewhich or findtexmf

2005-04-29 12 Improved the documentation

2005-05-24 12 Bugfix.

2005-07-29 12 Some updates to the documentation.