GETTRACKKERNTABLE

short Escape(hdc, GETTRACKKERNTABLE, NULL, NULL,lpOutData)

The GETTRACKKERNTABLE printer escape fills the buffer pointed to by the lpOutData parameter with the track-kerning table for the currently selected font.

Parameters

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 kerning tracks for the font. The number of tracks in the font can be obtained from the EXTTEXTMETRIC structure which is returned by the GETEXTENDEDTEXTMETRICS escape. For more information about this structure, see the following Comments section.

Return Value

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.

Comments

The KERNTRACK structure has the following form:

struct KERNTRACK {
    short Degree;
    short MinSize;
    short MinAmount;
    short MaxSize;
    short MaxAmount;
};

Following are the members in the KERNTRACK structure:

Degree

Specifies the amount of track kerning. Increasingly negative values represent tighter track kerning, and increasingly positive values represent looser track kerning.

MinSize

Specifies, in device units, the minimum font size for which linear track kerning applies.

MinAmount

Specifies, in font units, the amount of track kerning to apply to font sizes less than or equal to the size specified by the MinSize member.

MaxSize

Specifies, in device units, the maximum font size for which linear track kerning applies.

MaxAmount

Specifies, in font units, the amount of track kerning to apply to font sizes greater than or equal to the size specified by the MaxSize member.

Between the MinSize and MaxSize font sizes, track kerning is a linear
function from MinAmount to MaxAmount. 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.