short Escape(hdc, GETPAIRKERNTABLE, NULL, NULL,lpOutData)
The GETPAIRKERNTABLE printer escape fills the buffer pointed to by the lpOutData parameter with the character-pair kerning table for the selected font.
hdc
HDC Identifies the device context.
lpOutData
KERNPAIR FAR * Points to an array of KERNPAIR structures. This array must be large enough to accommodate the entire character-pair kerning table for the font. The number of character-kerning pairs in the font can be obtained from the EXTTEXTMETRIC structure returned by the GETEXTENDEDTEXTMETRICS escape. For more information about this structure, see the following Comments section.
The return value specifies the number of KERNPAIR structures copied to the buffer. This value is zero if the font does not have kerning pairs defined or the escape fails or is not implemented.
The KERNPAIR structure has the following form:
struct KERNPAIR {
union {
BYTE each [2]; /* 'each' and 'both' share same memory */
WORD both;
} kpPair;
short kpKernAmount;
};
Following are the members in the KERNPAIR structure:
each
Specifies the character codes for the kerning pair.
both
Specifies a 16-bit value in which the first character in the kerning pair is in the low-order byte and the second character is in the high-order byte.
kpKernAmount
Specifies the signed amount that this pair will be kerned if they appear side by side in the same font and size. This value is typically negative because pair-kerning usually results in two characters being set tighter than normal.
The array of KERNPAIR structures is sorted in increasing order by the kpPair.both member.
The values returned in KERNPAIR structures are affected by whether relative character widths are enabled or disabled. For more information, see the description of the ENABLERELATIVEWIDTHS escape earlier in this chapter.