short Escape(hDC, GETTRACKKERNTABLE, NULL, NULL,lpOutData)
This escape fills the buffer pointed to by the lpOutData parameter with the track-kerning table for the currently selected font.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
lpOutdata | KERNTRACK FAR * Points to an array of KERNTRACK structures. This array must be large enough to accommodate all the font's kerning tracks. The number of tracks in the font can be obtained from the EXTTEXTMETRIC structure returned by the GETEXTENDEDTEXTMETRICS escape. See the following “Comments” section for the format of the KERNTRACK data structure. |
The return value specifies the number of KERNTRACK structures copied to the buffer. This value is zero if the font does not have kerning tracks defined, or if the escape fails or is not implemented.
The KERNTRACK data structure has the following format:
typedef struct {
short ktDegree;
short ktMinSize;
short ktMinAmount;
short ktMaxSize;
short ktMaxAmount;
} KERNTRACK;
The KERNTRACK structure contains the following fields:
Field | Description |
ktDegree | Specifies the amount of track kerning. Increasingly negative values represent tighter track kerning, and increasingly positive values represent looser track kerning. |
ktMinSize | Specifies in device units the minimum font size for which linear track kerning applies. |
ktMinAmount | Specifies in font units the amount of track kerning to apply to font sizes less than or equal to the size specified by the ktMinSize field. |
ktMaxSize | Specifies in device units the maximum font size for which linear track kerning applies. |
ktMaxAmount | Specifies in font units the amount of track kerning to apply to font sizes greater than or equal to the size specified by the ktMaxSize field. |
Between the ktMinSize and ktMaxSize font sizes, track kerning is a linear function from ktMinAmount to ktMaxAmount. The values returned in the KERNTRACK 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.