CDC::GetKerningPairs

Retrieves the character kerning pairs for the font that is currently selected in the specified device context.

int GetKerningPairs(
   int nPairs,
   LPKERNINGPAIR lpkrnpair 
) const;

Parameters

  • nPairs
    Specifies the number of KERNINGPAIR structures pointed to by lpkrnpair. The function will not copy more kerning pairs than specified by nPairs.

  • lpkrnpair
    Points to an array of KERNINGPAIR structures that receive the kerning pairs when the function returns. This array must contain at least as many structures as specified by nPairs. If this parameter is NULL, the function returns the total number of kerning pairs for the font.

Return Value

Specifies the number of kerning pairs retrieved or the total number of kerning pairs in the font, if the function is successful. Zero is returned if the function fails or there are no kerning pairs for the font.

Requirements

Header: afxwin.h

See Also

Reference

CDC Class

Hierarchy Chart

GetKerningPairs

KERNINGPAIR

Other Resources

CDC Members