ENABLEPAIRKERNING

short Escape(hdc, ENABLEPAIRKERNING, sizeof(int),lpNewKernFlag,lpOldKernFlag)

The ENABLEPAIRKERNING printer escape enables or disables the ability of the driver to kern character pairs automatically. Kerning is the process of adding or subtracting space between characters in a string of text.

When pair kerning is enabled, the driver automatically kerns those pairs of characters that are listed in the character-pair kerning table for the font. The driver reflects this kerning both on the printer and in the GetTextExtent function calls.

Parameters

hdc

HDC Identifies the device context.

lpNewKernFlag

LPINT Points to a short-integer value that specifies whether automatic pair kerning is to be enabled (1) or disabled (zero).

lpOldKernFlag

LPINT Points to a short-integer value that receives the previous automatic pair-kerning value.

Return Value

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

Comments

The default state of this escape is zero; automatic character-pair kerning is disabled.

A driver does not have to support the ENABLEPAIRKERNING escape just because it supplies the character-pair kerning table to the application by using the GETPAIRKERNTABLE escape. When the GETPAIRKERNTABLE escape is supported but the ENABLEPAIRKERNING escape is not, the application must properly space the kerned characters on the output device by using the ExtTextOut function.