SETKERNTRACK

short Escape(hdc, SETKERNTRACK, sizeof(int),lpNewTrack,lpOldTrack)

The SETKERNTRACK printer escape specifies which kerning track to use for drivers that support automatic track kerning. A kerning track of zero disables automatic track kerning.

When track kerning is enabled, the driver will automatically kern all characters according to the specified track. The driver will reflect this kerning both on the printer and in GetTextExtent function calls.

Parameters

hdc

HDC Identifies the device context.

lpNewTrack

LPINT Points to a short integer that specifies the kerning track to use. A value of zero disables this feature. Values in the range 1 through the value of the etmKernTracks member correspond to positions in the track-kerning table (using 1 as the first item in the table). For more information, see the description of the EXTTEXTMETRIC structure provided in the description of the GETEXTENDEDTEXTMETRICS escape earlier in this chapter.

lpOldTrack

LPINT Points to a short integer that will receive the previous kerning track.

Return Value

The return value specifies the outcome of the escape. It is 1 if the escape is successful and zero if the escape is not successful or not implemented.

Comments

Automatic track kerning is disabled by default.

A driver does not have to support the SETKERNTRACK escape just because it supplies the track-kerning table to the application by using the GETTRACKKERNTABLE escape. In a case where GETTRACKKERNTABLE is supported but the SETKERNTRACK escape is not, the application must properly space the characters on the output device.