GetKerningPairsA function

The GetKerningPairs function retrieves the character-kerning pairs for the currently selected font for the specified device context.

Syntax

DWORD GetKerningPairsA(
  HDC           hdc,
  DWORD         nPairs,
  LPKERNINGPAIR lpKernPair
);

Parameters

hdc

A handle to the device context.

nPairs

The number of pairs in the lpkrnpair array. If the font has more than nNumPairs kerning pairs, the function returns an error.

lpKernPair

A pointer to an array of KERNINGPAIR structures that receives the kerning pairs. The array must contain at least as many structures as specified by the nNumPairs parameter. If this parameter is NULL, the function returns the total number of kerning pairs for the font.

Return Value

If the function succeeds, the return value is the number of kerning pairs returned.

If the function fails, the return value is zero.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See Also

Font and Text Functions

Fonts and Text Overview

KERNINGPAIR