IDWriteTextAnalyzer1::GetJustificationOpportunities method

Retrieves justification opportunity information for each of the glyphs given the text and shaping glyph properties.

Syntax


virtual HRESULT GetJustificationOpportunities(
  IDWriteFontFace *fontFace,
  FLOAT fontEmSize,
  DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
  UINT32 textLength,
  UINT32 glyphCount,
  [in]   const WCHAR *textString,
  [in]   const UINT16 *clusterMap,
  [in]   const DWRITE_SHAPING_GLYPH_PROPERTIES *glyphProperties,
  [out]  DWRITE_JUSTIFICATION_OPPORTUNITY *justificationOpportunities
) = 0;

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.

textString [in]

Type: const WCHAR*

Characters used to produce the glyphs.

clusterMap [in]

Type: const UINT16*

Clustermap produced from shaping.

glyphProperties [in]

Type: const DWRITE_SHAPING_GLYPH_PROPERTIES*

Glyph properties produced from shaping.

justificationOpportunities [out]

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.

Note  this function only supports natural metrics (DWRITE_MEASURING_MODE_NATURAL).

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

Dwrite_1.h

Library

Dwrite_1.lib

DLL

Dwrite_1.dll

See also

IDWriteTextAnalyzer1

 

 

Community Additions

ADD
Show:
© 2014 Microsoft