EN
Este contenido no se encuentra disponible en su idioma, pero aquí tiene la versión en inglés.

IDWriteTextAnalyzer1::GetTextComplexity method

Determines the complexity of text, and whether you need to call IDWriteTextAnalyzer::GetGlyphs for full script shaping.

Syntax


virtual HRESULT GetTextComplexity(
  [in]            const WCHAR           *textString,
                        UINT32          textLength,
                        IDWriteFontFace *fontFace,
  [out]                 BOOL            *isTextSimple,
  [out]                 UINT32          *textLengthRead,
  [out, optional]       UINT16          *glyphIndices
) = 0;

Parameters

textString [in]

Type: const WCHAR*

The text to check for complexity. This string may be UTF-16, but any supplementary characters will be considered complex.

textLength

Type: UINT32

Length of the text to check.

fontFace

Type: IDWriteFontFace*

The font face to read.

isTextSimple [out]

Type: BOOL*

If true, the text is simple, and the glyphIndices array will already have the nominal glyphs for you. Otherwise, you need to call IDWriteTextAnalyzer::GetGlyphs to properly shape complex scripts and OpenType features.

textLengthRead [out]

Type: UINT32*

The length read of the text run with the same complexity, simple or complex. You may call again from that point onward.

glyphIndices [out, optional]

Type: UINT16*

Optional glyph indices for the text. If the function returned that the text was simple, you already have the glyphs you need. Otherwise the glyph indices are not meaningful, and you need to call IDWriteTextAnalyzer::GetGlyphs for shaping instead.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Text is not simple if the characters are part of a script that has complex shaping requirements, require bidi analysis, combine with other characters, reside in the supplementary planes, or have glyphs that participate in standard OpenType features. The length returned will not split combining marks from their base characters.

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.lib

DLL

Dwrite.dll

See also

IDWriteTextAnalyzer::GetGlyphs
IDWriteTextAnalyzer1

 

 

Adiciones de comunidad

AGREGAR
Mostrar:
© 2015 Microsoft