PRINTERFONTHEADER STRUC
pfhSelType dw ? ;selection type
pfhSeqLength dw ? ;sequence length, in bytes
PRINTERFONTHEADER ENDS
The PRINTERFONTHEADER structure contains information about the length and content of the control-sequence data used for the printer font. The structure is followed immediately by control-sequence data and possibly one or more bytes of downloadable font data.
pfhSelType
Specifies the selection type for the printer font. This field can be either of the following values:
Value | Meaning |
1 | The control-sequence data consists of hardware escape data followed by downloadable escape data. The hardware escape data contains the sequence of characters that selects the hardware (default) font of the printer. The first byte of the hardware escape data specifies the number of characters in the sequence. The downloadable escape data contains the sequence of control characters that selects the downloaded font currently resident in the printer. The first byte of the downloadable escape data specifies the number of characters in the sequence. The total number of bytes in the hardware and downloadable escape data must equal the number of bytes specified in the pfhSeqLength field. |
2 | The control-sequence data consists of a single escape sequence that selects the font for this code page. This font may have been downloaded. |
pfhSeqLength
Specifies the length of the control-sequence data, in bytes. This value must always be less than 31.
The control-sequence data is used for initializing the printer for the code page associated with this font.
Unlike the size of a screen-font description, the size of the printer-font description cannot be determined directly. Instead, its size must be calculated from the fdhLength field of the FONTDATAHEADER structure. As a result, only one printer-font description can immediately follow a FONTDATAHEADER structure.
The downloadable font data consists of the escape sequence required to download the font description. This escape sequence depends on the printer. Its size is determined by subtracting the size of the PRINTERFONTHEADER structure from the value contained in the fdhLength field of the corresponding FONTDATAHEADER structure. Since the 4208 and 5202 printers have hardware support for code pages, they do not need any font data to be downloaded. Therefore, the fdhLength field is nonexistent in those font files.
These existing printer files use the following selection types:
Type | Filename |
1 | 4201.CPI |
2 | 4208.CPI or 5202.CPI |