Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetKerningPairs function

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

Syntax


DWORD GetKerningPairs(
  _In_   HDC hdc,
  _In_   DWORD nNumPairs,
  _Out_  LPKERNINGPAIR lpkrnpair
);

Parameters

hdc [in]

A handle to the device context.

nNumPairs [in]

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

lpkrnpair [out]

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]

Header

WinGdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

Unicode and ANSI names

GetKerningPairsW (Unicode) and GetKerningPairsA (ANSI)

See also

Fonts and Text Overview
Font and Text Functions
KERNINGPAIR

 

 

Community Additions

Show:
© 2014 Microsoft