Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
GpiQueryKerningPairs (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPILCIDS
LONG GpiQueryKerningPairs(hps, ckrnpr, akrnpr)
HPS hps; /* presentation-space handle */
LONG ckrnpr; /* number of kerning pairs */
PKERNINGPAIRS akrnpr; /* address of array of kerning-pair structures */
The GpiQueryKerningPairs function retrieves kerning-pair information for the
current font for the presentation space. The kerning-pair information
specifies the characters to be kerned and the amount of space in world
coordinates to kern. The number of kerned pairs for a given font is
specified in the font metrics for that font.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
ckrnpr Specifies the number of kerning pairs to retrieve.
akrnpr Points to the array of KERNINGPAIRS structures that receives the
kerning-pair information. The array must have the number of
elements specified by the ckrnpr parameter.
Return Value
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
PMERR_INV_HPS
PMERR_INV_LENGTH_OR_COUNT
PMERR_PS_BUSY
Example
This example uses the GpiQueryKerningPairs function to retrieve the kerning
information for the current font.
FONTMETRICS fm;
SEL sel;
PKERNINGPAIRS akrnpr;
GpiQueryFontMetrics(hps, (LONG) sizeof(FONTMETRICS), &fm);
DosAllocSeg(fm.sKerningPairs * sizeof(KERNINGPAIRS), &sel,
SEG_NONSHARED);
akrnpr = MAKEP(sel, 0);
GpiQueryKerningPairs(hps, (LONG) fm.sKerningPairs, akrnpr);
See Also
GpiQueryFontMetrics, KERNINGPAIRS
♦