short Escape(hDC, ENABLEPAIRKERNING, sizeof(int),lpNewKernFlag,lpOldKernFlag)
This escape enables or disables the driver's ability 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 font's character-pair kerning table. The driver reflects this kerning both on the printer and in GetTextExtent function calls.
Parameter | Type/Description |
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 (0). | |
lpOldKernFlag | LPINT Points to a short-integer value that will receive the previous automatic pair-kerning value. |
The return value specifies the outcome of the escape. It is 1 if the escape is successful; it is zero if the escape is not successful or not implemented.
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 via the GETPAIRKERNTABLE escape. In the case where the GETPAIRKERNTABLE escape is supported but the ENABLEPAIRKERNING escape is not, the application must properly space the kerned characters on the output device using the ExtTextOut function.