GetGlyphIndices

[This is preliminary documentation and subject to change.]

The GetGlyphIndices function translates a string into an array of glyph indices. The function can be used to determine whether a glyph exists in a font.

WINGDIAPI DWORD WINAPI GetGlyphIndices(
  HDC hdc,       // device context
  LPCTSTR lpstr, // string to convert
  int c,         // number of characters in string
  LPWORD pgi,    // array of glyph indices
  DWORD fl       // flags
);
 

Parameters

hdc
Handle to the device context
lpstr
Pointer to the string to be converted.
c
Number of characters in pgi.
pgi
Array of glyph indices corresponding to the characters in the string.
fl
Flags indicating how glyphs should be handled if they are not supported. This parameter can be the following value:
Value Meaning
GGI_MARK_NONEXISTING_GLYPHS Mark unsupported glyphs with the hexadecimal value 0xffff.

Return Values

If the function succeeds, it returns the number of characters converted.

If the function fails, the return value is GDI_ERROR.

Windows NT: To get extended error information, call GetLastError.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Fonts and Text Overview, Font and Text Functions, GetFontUnicodeRanges