Platform SDK: International Features |
The ScriptGetCMap function takes a string and returns the glyph indices of the Unicode characters according to the TrueType cmap table or the standard cmap table implemented for old style fonts.
HRESULT WINAPI ScriptGetCMap( HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars, DWORD dwFlags, WORD *pwOutGlyphs );
Value | Meaning |
---|---|
SGCM_RTL | Indicates the glyph array pwOutGlyps should contain mirrored glyphs for those glyphs that have a mirrored equivalent. |
If all Unicode code points are present in the font, the return value is S_OK.
If the function fails, it may return one of the following nonzero values.
Return value | Meaning |
---|---|
E_HANDLE | The font or the system does not support glyph indices. |
S_FALSE | Some of the Unicode code points were mapped to the default glyph. |
If any other unrecoverable error is encountered, it is also returned as HRESULT. For example, error returns from Win32 API functions are converted to HRESULT using the HRESULT_FROM_WIN32 macro and returned to the client in the HRESULT.
ScriptGetCMap may be used to determine which characters in a run are supported by the selected font. The caller may scan the returned glyph buffer looking for the default glyph to determine which characters are not available. The default glyph index for the selected font should be determined by calling ScriptGetFontProperties.
The return value indicates the presence of any missing glyphs.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Usp10.h.
Library: Use Usp10.lib.
Uniscribe Overview, Uniscribe Functions, ScriptGetFontProperties, SCRIPT_CACHE