2.2 Printer-Cartridge Metrics Files

A printer-cartridge metrics (PCM) file has the following general form:

PCMHEADER Header; /* font header */

char CartridgeTitle[]; /* title for cartridge */

BYTE PFMFiles[]; /* an array of PFM files */

The PCMHEADER structure contains information about the PCM files, such as its size and the location of the cartridge title. For more information about structures, see Section 2.4, “Structure Reference” later in this chapter.

The PCMHEADER structure must contain a nonzero offset to the cartridge title. This string must be nonempty and null-terminated. This title is used in the cartridge list box in the Printer Setup dialog box.

The PCM file must contain one PFM file for each font in the cartridge. The files must be appended together. Since each PFM file contains its own size in bytes, the location of each PFM file is calculated as an offset from the previous PFM file. All file positions in a PFM file itself are offsets from the beginning of the individual PFM file and the PCM file.