IDWriteTextAnalyzer1::ApplyCharacterSpacing method
Applies spacing between characters, properly adjusting glyph clusters and diacritics.
Syntax
HRESULT ApplyCharacterSpacing( FLOAT leadingSpacing, FLOAT trailingSpacing, FLOAT minimumAdvanceWidth, UINT32 textLength, UINT32 glyphCount, [in] const UINT16 *clusterMap, [in] const FLOAT *glyphAdvances, [in] const DWRITE_GLYPH_OFFSET *glyphOffsets, [in] const DWRITE_SHAPING_GLYPH_PROPERTIES *glyphProperties, [out] FLOAT *modifiedGlyphAdvances, [out] DWRITE_GLYPH_OFFSET *modifiedGlyphOffsets );
Parameters
- leadingSpacing
-
The spacing before each character, in reading order.
- trailingSpacing
-
The spacing after each character, in reading order.
- minimumAdvanceWidth
-
The minimum advance of each character, to prevent characters from becoming too thin or zero-width. This must be zero or greater.
- textLength
-
The length of the clustermap and original text.
- glyphCount
-
The number of glyphs.
- clusterMap [in]
-
Mapping from character ranges to glyph ranges.
- glyphAdvances [in]
-
The advance width of each glyph.
- glyphOffsets [in]
-
The offset of the origin of each glyph.
- glyphProperties [in]
-
Properties of each glyph, from GetGlyphs.
- modifiedGlyphAdvances [out]
-
The new advance width of each glyph.
- modifiedGlyphOffsets [out]
-
The new offset of the origin of each glyph.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The input and output advances/offsets are allowed to alias the same array.
Requirements
|
Minimum supported client |
Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [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