IDWriteTextAnalyzer1::GetJustificationOpportunities method (dwrite_1.h)
Retrieves justification opportunity information for each of the glyphs given the text and shaping glyph properties.
Syntax
HRESULT GetJustificationOpportunities(
IDWriteFontFace *fontFace,
FLOAT fontEmSize,
DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
UINT32 textLength,
UINT32 glyphCount,
[in] WCHAR const *textString,
[in] UINT16 const *clusterMap,
[in] DWRITE_SHAPING_GLYPH_PROPERTIES const *glyphProperties,
[out] DWRITE_JUSTIFICATION_OPPORTUNITY *justificationOpportunities
);
Parameters
fontFace
Type: IDWriteFontFace*
Font face that was used for shaping. This is mainly important for returning correct results of the kashida width.
May be NULL.
fontEmSize
Type: FLOAT
Font em size used for the glyph run.
scriptAnalysis
Type: DWRITE_SCRIPT_ANALYSIS
Script of the text from the itemizer.
textLength
Type: UINT32
Length of the text.
glyphCount
Type: UINT32
Number of glyphs.
[in] textString
Type: const WCHAR*
Characters used to produce the glyphs.
[in] clusterMap
Type: const UINT16*
Clustermap produced from shaping.
[in] glyphProperties
Type: const DWRITE_SHAPING_GLYPH_PROPERTIES*
Glyph properties produced from shaping.
[out] justificationOpportunities
Type: DWRITE_JUSTIFICATION_OPPORTUNITY*
A pointer to a DWRITE_JUSTIFICATION_OPPORTUNITY structure that receives info for the allowed justification expansion/compression for each glyph.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This function is called per-run, after shaping is done via the IDWriteTextAnalyzer::GetGlyphs method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | dwrite_1.h |
Library | Dwrite_1.lib |
DLL | Dwrite_1.dll |