typedef struct tagTEXTMETRIC {
short tmHeight; // see below
short tmAscent; // see below
short tmDescent; // see below
short tmInternalLeading; // see below
short tmExternalLeading; // recommended amount of leading
short tmAveCharWidth; // avg. width of characters in font
short tmMaxCharWidth; // max. width of any character in font
short tmWeight; // weight of font
BYTE tmItalic; // italic font if value is nonzero
BYTE tmUnderlined; // underlined font if value is nonzero
BYTE tmStruckOut; // struckout font if value is nonzero
BYTE tmFirstChar; // value of first character for font
BYTE tmLastChar; // value of last character for font
BYTE tmDefaultChar; // see below
BYTE tmBreakChar; // see below
BYTE tmPitchAndFamily; // see below
BYTE tmCharSet; // see below
short tmOverhang; // see below
short tmDigitizedAspectX; // see below
short tmDigitizedAspectY; // see below
} TEXTMETRIC;
Contains a list of the basic metrics of a physical font.
DEFAULT_PITCH (0x00) | Chooses a reasonable font. |
FIXED_PITCH (0x01) | Chooses a fixed-pitch font. |
VARIABLE_PITCH (0x02) | Chooses a variable-pitch font. |
The font-family value can be one of these values:
FF_DONTCARE (0x00) | Chooses a reasonable font. |
FF_ROMAN (0x10) | Chooses a variable-pitch font with serifs. |
FF_SWISS (0x20) | Chooses a variable-pitch fonts without serifs. |
FF_MODERN (0x30) | Chooses a fixed-pitch font. |
FF_SCRIPT (0x40) | Chooses a cursive or script font. |
FF_DECORATIVE (0x50) | Chooses a novelty font. |
ANSI_CHARSET (0x00) | ANSI character set. |
SYMBOL_CHARSET (0x02) | Symbol character set. |
OEM_CHARSET (0xFF) | OEM-specific character set. The characters and corresponding character codes depend on the computer. |
GDI makes a string bold by expanding the intracharacter spacing and overstriking with an offset; the overhang is the distance by which the overstrike is offset. GDI italicizes a font by skewing the string, and the overhang is the amount the top of the font is skewed past the bottom of the font.