IDWriteTextAnalyzer::GetGlyphPlacements method
Places glyphs output from the GetGlyphs method according to the font and the writing system's rendering rules.
Syntax
virtual HRESULT GetGlyphPlacements( [in] const WCHAR * textString, [in] const UINT16 * clusterMap, [in] DWRITE_SHAPING_TEXT_PROPERTIES * textProps, UINT32 textLength, [in] const UINT16 * glyphIndices, [in] const DWRITE_SHAPING_GLYPH_PROPERTIES * glyphProps, UINT32 glyphCount, IDWriteFontFace * fontFace, FLOAT fontEmSize, BOOL isSideways, BOOL isRightToLeft, [in] const DWRITE_SCRIPT_ANALYSIS * scriptAnalysis, [in, optional] const WCHAR * localeName, [in, optional] const DWRITE_TYPOGRAPHIC_FEATURES ** features, [in, optional] const UINT32 * featureRangeLengths, UINT32 featureRanges, [out] FLOAT * glyphAdvances, [out] DWRITE_GLYPH_OFFSET * glyphOffsets ) = 0;
Parameters
- textString [in]
-
Type: const WCHAR*
An array of characters containing the original string from which the glyphs came.
- clusterMap [in]
-
Type: const UINT16*
A pointer to the mapping from character ranges to glyph ranges. This is returned by GetGlyphs.
- textProps [in]
-
Type: DWRITE_SHAPING_TEXT_PROPERTIES*
A pointer to an array of structures that contains shaping properties for each character. This structure is returned by GetGlyphs.
- textLength
-
Type: UINT32
The text length of textString.
- glyphIndices [in]
-
Type: const UINT16*
An array of glyph indices returned by GetGlyphs.
- glyphProps [in]
-
Type: const DWRITE_SHAPING_GLYPH_PROPERTIES*
A pointer to an array of structures that contain shaping properties for each glyph returned by GetGlyphs.
- glyphCount
-
Type: UINT32
The number of glyphs returned from GetGlyphs.
- fontFace
-
Type: IDWriteFontFace*
A pointer to the font face that is the source for the output glyphs.
- fontEmSize
-
Type: FLOAT
The logical font size in DIPs.
- isSideways
-
Type: BOOL
A Boolean flag set to TRUE if the text is intended to be drawn vertically.
- isRightToLeft
-
Type: BOOL
A Boolean flag set to TRUE for right-to-left text.
- scriptAnalysis [in]
-
Type: const DWRITE_SCRIPT_ANALYSIS*
A pointer to a Script analysis result from an AnalyzeScript call.
- localeName [in, optional]
-
Type: const WCHAR*
An array of characters containing 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, the default mapping based on the script is used.
- features [in, optional]
-
Type: const DWRITE_TYPOGRAPHIC_FEATURES**
An array of pointers to the sets of typographic features to use in each feature range.
- featureRangeLengths [in, optional]
-
Type: const UINT32*
The length of each feature range, in characters. The sum of all lengths should be equal to textLength.
- featureRanges
-
Type: UINT32
The number of feature ranges.
- glyphAdvances [out]
-
Type: FLOAT*
When this method returns, contains the advance width of each glyph.
- glyphOffsets [out]
-
Type: DWRITE_GLYPH_OFFSET*
When this method returns, contains the offset of the origin of each glyph.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
|
Minimum supported client |
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also