GetCharWidthI function

The GetCharWidthI function retrieves the widths, in logical coordinates, of consecutive glyph indices in a specified range from the current font.

Syntax

BOOL GetCharWidthI(
  HDC    hdc,
  UINT   giFirst,
  UINT   cgi,
  LPWORD pgi,
  LPINT  piWidths
);

Parameters

hdc

A handle to the device context.

giFirst

The first glyph index in the group of consecutive glyph indices.

cgi

The number of glyph indices.

pgi

A pointer to an array of glyph indices. If this parameter is not NULL, it is used instead of the giFirst parameter.

piWidths

A pointer to a buffer that receives the widths, in logical coordinates.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

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.

Requirements

   

See also

Font and Text Functions

Fonts and Text Overview

GetCharABCWidths

GetCharABCWidthsFloat

GetCharWidth32

GetCharWidthFloat