IDWriteTextAnalysisSource::GetNumberSubstitution method (dwrite.h)

Gets the number substitution from the text range affected by the text analysis.


HRESULT GetNumberSubstitution(
        UINT32                    textPosition,
  [out] UINT32                    *textLength,
  [out] IDWriteNumberSubstitution **numberSubstitution



Type: UINT32

The starting position from which to report.

[out] textLength

Type: UINT32*

Contains the length of the text, in characters, remaining in the text range up to the next differing number substitution.

[out] numberSubstitution

Type: IDWriteNumberSubstitution**

Contains an address of a pointer to an object, which was created with IDWriteFactory::CreateNumberSubstitution, that holds the appropriate digits and numeric punctuation for a given locale.

Return value


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


Any implementation should return the number substitution with an incremented reference count, and the analysis will release when finished with it (either before the next call or before it returns). However, the sink callback may hold onto it after that.


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

See also