The GetCharWidthI function retrieves the widths, in logical coordinates, of consecutive glyph indices in a specified range from the current font.
BOOL GetCharWidthI( HDC hdc, UINT giFirst, UINT cgi, LPWORD pgi, LPINT piWidths );
A handle to the device context.
The first glyph index in the group of consecutive glyph indices.
The number of glyph indices.
A pointer to an array of glyph indices. If this parameter is not NULL, it is used instead of the giFirst parameter.
A pointer to a buffer that receives the widths, in logical coordinates.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
The GetCharWidthI function processes a consecutive glyph indices if the pgi parameter is NULL with the giFirst parameter indicating the first glyph index to process and the cgi parameter indicating how many glyph indices to process. Otherwise the GetCharWidthI function processes the array of glyph indices pointed to by the pgi parameter with the cgi parameter indicating how many glyph indices to process.
If a character does not exist in the current font, it is assigned the width of the default character.