Parses the input text string and maps it to the set of glyphs and associated glyph data according to the font and the writing system's rendering rules.
HRESULT GetGlyphs( WCHAR const *textString, UINT32 textLength, IDWriteFontFace *fontFace, BOOL isSideways, BOOL isRightToLeft, DWRITE_SCRIPT_ANALYSIS const *scriptAnalysis, WCHAR const *localeName, IDWriteNumberSubstitution *numberSubstitution, DWRITE_TYPOGRAPHIC_FEATURES const **features, UINT32 const *featureRangeLengths, UINT32 featureRanges, UINT32 maxGlyphCount, UINT16 *clusterMap, DWRITE_SHAPING_TEXT_PROPERTIES *textProps, UINT16 *glyphIndices, DWRITE_SHAPING_GLYPH_PROPERTIES *glyphProps, UINT32 *actualGlyphCount );
Type: const WCHAR*
An array of characters to convert to glyphs.
The length of textString.
The font face that is the source of the output glyphs.
A Boolean flag set to TRUE if the text is intended to be drawn vertically.
A Boolean flag set to TRUE for right-to-left text.
Type: const DWRITE_SCRIPT_ANALYSIS*
A pointer to a Script analysis result from an AnalyzeScript call.
Type: const WCHAR*
The locale to use when selecting glyphs. For example the same character may map to different glyphs for ja-jp versus zh-chs. If this is NULL, then the default mapping based on the script is used.
A pointer to an optional number substitution which selects the appropriate glyphs for digits and related numeric characters, depending on the results obtained from AnalyzeNumberSubstitution. Passing NULL indicates that no substitution is needed and that the digits should receive nominal glyphs.
Type: const DWRITE_TYPOGRAPHIC_FEATURES**
An array of pointers to the sets of typographic features to use in each feature range.
Type: const UINT32*
The length of each feature range, in characters.
The sum of all lengths should be equal to textLength.
The number of feature ranges.
The maximum number of glyphs that can be returned.
When this method returns, contains the mapping from character ranges to glyph ranges.
When this method returns, contains a pointer to an array of structures that contains shaping properties for each character.
The output glyph indices.
When this method returns, contains a pointer to an array of structures that contain shaping properties for each output glyph.
When this method returns, contains the actual number of glyphs returned if the call succeeds.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Note that the mapping from characters to glyphs is, in general, many-to-many. The recommended estimate for the per-glyph output buffers is (3 * textLength / 2 + 16). This is not guaranteed to be sufficient.
The value of the <i>actualGlyphCount</i> parameter is only valid if the call succeeds. In the event that <i>maxGlyphCount</i> is not big enough, <b>HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)</b> will be returned. The application should allocate a larger buffer and try again.
|Minimum supported client||Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]|