A printer font metrics (PFM) file has the following general form:
PFMHEADER Header; /* font header */
WORD WidthTable[]; /* character widths */
PFMEXTENSION Extensions; /* extensions */
char DeviceName[]; /* printer-device name */
char FaceName[]; /* font name */
EXTTEXTMETRIC ExtTextMetrics; /* extended-text metrics */
WORD ExtentTable[]; /* unscaled-character widths */
DRIVERINFO DriverInfo; /* driver-specific information */
PAIRKERN KerningPairs[]; /* pair-kerning table */
KERNTRACK KerningTracks[]; /* track-kerning table */
The PFMHEADER structure, the PFMEXTENSION structure, and font name must be present in every PFM file. Whether a PFM file contains any of the other structures and arrays depends on the printer driver and the font vendor's preferences.
The PFMHEADER and PFMEXTENSION structures must be, respectively, the first and second structures in the file. The remaining structures and arrays may appear in any order. Their locations are indicated by the offsets in the PFMHEADER and PFMEXTENSION structures.
The following sections describe the arrays in the file, such as the width table. For more information about the structures, see Section 2.4, “Structure Reference,” later in this chapter.