The following structure is used by all Printer Font Metrics (PFM) files used by drivers that are supported by the Microsoft Windows Universal Driver.
typedef struct
{
short sSize; // size of this structure.
short iVersion; // version number.
WORD fCaps; // members describing capabilities.
short iFontID; // unique font ID defined by the driver.
short sYAdjust; // adjust y position before output character
// used by double height character.
short sYMoved; // cursor moved after printing this font.
short iTransTab; // index to translation table resource.
short sUnderlinePos;
short sDoubleUnderlinePos;
short sStrikeThruPos;
LOCD locdSelect; // long offset to command descriptor.
LOCD locdUnSelect;// long offset to command descriptor to
// cancel selection.
WORD wPrivateData;// private data to be used by minidriver.
short sShift; // number of pixels to shift each character.
} DRIVERINFO;
Member | Description |
sSize | Specifies the size of the structure. |
iVersion | Specifies the version number of this structure. This specification describes version 0x0100 (implied decimal for version 1.00). |
Member | Description (continued) |
fCaps | Specifies the bit flags describing capabilities. | ||
Value | Meaning |
DF_NOITALIC | This font cannot be italicized using FONTSIMULATION. |
DF_NOUNDER | This font cannot be underlined using FONTSIMULATION. |
DF_XM_CR | A carriage return is sent after using this font. |
DF_NOBOLD | This font cannot be made bold using FONTSIMULATION. |
DF_NO2UNDERLINE | This font cannot produce double underlines using FONTSIMULATION. |
DF_NOSTRIKETHRU | This font cannot be struck through using FONTSIMULATION. |
DF_BKSP_OK | This fonts uses a CTT_WTYPE_PAIRED character-translation table to determine how to overstrike characters. If it is set, it is assumed that a single backspace character can be used to move the cursor to the start of the bounding box of the previous character prior to overstriking. If it is not set, it is assumed that explicit x-movement commands are required to position the cursor for an overstrike. If the font does not use a CTT_WTYPE_PAIRED translation table, this flag is ignored. |
iFontID | Reserved; do not use. |
sYAdjust | Specifies the distance to move the current y position, as expressed in master units, before printing characters in this font and size. This member is primarily used for double-height characters, and the specified distance to align the baseline accurately. |
Member | Description (continued) |
sYMoved | Specifies the distance to move the y position, as expressed in master units, after printing with this font and size. This member is also used to compensate for fonts that do not restore the cursor to the correct y position. It is primarily used for double-height characters. |
iTransTab | Specifies the index to character-translation table resource for this font. This may zero, a positive, or negative number. If this is zero, use the character-translation table referred to in the ModelData dialog box for this model. If this is a negative number, the Universal Printer Driver will take the absolute value and use its own character-translation table resource with this ID. If this is a positive value, the Universal Printer Driver will use the driver-defined character-translation table resource with this ID value. |
sUnderlinePos | Specifies the position of the hardware underline created by FS_OCD_ST_UNDERLINE_ON from the bottom of the character-bounding box. This member is measured in master units. |
sDoubleUnderlinePos | Specifies the position of the hardware double underline created by FS_OCD_ST_DOUBLEUNDERLINE_ON from the bottom of the character-bounding box. This member is measured in master units. |
sStrikeThruPos | Specifies the position of the hardware strikethrough created by FS_OCD_ST_STRIKETHRU from the bottom of the character-bounding box. This member is measured in master units. |
locdSelect | Specifies the long offset to the command descriptor to select this font. |
locdUnSelect | Specifies the long offset to the command descriptor to cancel the selection of this font. This member is NOOCD if not used. |
wPrivateData | Specifies the private data to be used by the minidriver. |
sShift | Specifies the number of pixels to shift each character to the left or right. Negative numbers shift to the right; positive numbers shift to the left. |