ScriptGetCMap function (usp10.h)
Retrieves the glyph indexes of the Unicode characters in a string according to either the TrueType cmap table or the standard cmap table implemented for old-style fonts.
Syntax
HRESULT ScriptGetCMap(
[in] HDC hdc,
[in, out] SCRIPT_CACHE *psc,
[in] const WCHAR *pwcInChars,
[in] int cChars,
[in] DWORD dwFlags,
[out] WORD *pwOutGlyphs
);
Parameters
[in] hdc
Optional. Handle to the device context. For more information, see Caching.
[in, out] psc
Pointer to a SCRIPT_CACHE structure identifying the script cache.
[in] pwcInChars
Pointer to a string of Unicode characters.
[in] cChars
Number of Unicode characters in the string indicated by pwcInChars.
[in] dwFlags
Flags specifying any special handling of the glyphs. By default, the glyphs are provided in logical order with no special handling. This parameter can have the following value.
Value | Meaning |
---|---|
|
The glyph array indicated by pwOutGlyphs should contain mirrored glyphs for those glyphs that have a mirrored equivalent. |
[out] pwOutGlyphs
Pointer to a buffer in which the function retrieves an array of glyph indexes. This buffer should be of the same length as the input buffer indicated by pwcInChars. Each code point maps to a single glyph.
Return value
Returns S_OK if all Unicode code points are present in the font. The function returns one of the nonzero HRESULT values listed below if it does not succeed.
Return value | Meaning |
---|---|
E_HANDLE | The font or the operating system does not support glyph indexes. |
S_FALSE | Some of the Unicode code points were mapped to the default glyph. |
Remarks
See Displaying Text with Uniscribe for a discussion of the context in which this function is normally called.
This function can be used to determine the characters in a run that are supported by the selected font. The application can scan the retrieved glyph buffer, looking for the default glyph to determine characters that are not available. The application should determine the default glyph index for the selected font by calling ScriptGetFontProperties.
The return value for this function indicates the presence of any missing glyphs.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | usp10.h |
Library | Usp10.lib |
DLL | Usp10.dll |
Redistributable | Internet Explorer 5 or later on Windows Me/98/95 |