Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Places glyphs output from the GetGlyphs method according to the font and the writing system's rendering rules.
Syntax
HRESULT GetGlyphPlacements(
[in] WCHAR const *textString,
[in] UINT16 const *clusterMap,
[in] DWRITE_SHAPING_TEXT_PROPERTIES *textProps,
UINT32 textLength,
[in] UINT16 const *glyphIndices,
[in] DWRITE_SHAPING_GLYPH_PROPERTIES const *glyphProps,
UINT32 glyphCount,
IDWriteFontFace *fontFace,
FLOAT fontEmSize,
BOOL isSideways,
BOOL isRightToLeft,
[in] DWRITE_SCRIPT_ANALYSIS const *scriptAnalysis,
[in, optional] WCHAR const *localeName,
[in, optional] DWRITE_TYPOGRAPHIC_FEATURES const **features,
[in, optional] UINT32 const *featureRangeLengths,
UINT32 featureRanges,
[out] FLOAT *glyphAdvances,
[out] DWRITE_GLYPH_OFFSET *glyphOffsets
);
Parameters
[in] textString
Type: const WCHAR*
An array of characters containing the original string from which the glyphs came.
[in] clusterMap
Type: const UINT16*
A pointer to the mapping from character ranges to glyph ranges. This is returned by GetGlyphs.
[in] textProps
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.
[in] glyphIndices
Type: const UINT16*
An array of glyph indices returned by GetGlyphs.
[in] glyphProps
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.
[in] scriptAnalysis
Type: const DWRITE_SCRIPT_ANALYSIS*
A pointer to a Script analysis result from an AnalyzeScript call.
[in, optional] localeName
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.
[in, optional] features
Type: const DWRITE_TYPOGRAPHIC_FEATURES**
An array of pointers to the sets of typographic features to use in each feature range.
[in, optional] featureRangeLengths
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.
[out] glyphAdvances
Type: FLOAT*
When this method returns, contains the advance width of each glyph.
[out] glyphOffsets
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
| Requirement | Value |
|---|---|
| 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] |
| Target Platform | Windows |
| Header | dwrite.h |
| Library | Dwrite.lib |
| DLL | Dwrite.dll |