[]
        
(Showing Draft Content)

C1.Util.DX.DirectWrite.FontFallback.MapCharacters

MapCharacters Method

MapCharacters(TextAnalysisSource, int, int, FontCollection, string, FontWeight, FontStyle, FontStretch, out int, out float)

Determines an appropriate font to use to render the range of text.

Declaration
public Font MapCharacters(TextAnalysisSource source, int textPosition, int textLength, FontCollection baseFontCollection, string baseFamilyName, FontWeight baseWeight, FontStyle baseStyle, FontStretch baseStretch, out int mappedLength, out float scale)
Parameters
Type Name Description
TextAnalysisSource source

The text source implementation holds the text and locale.

int textPosition

Starting position to analyze.

int textLength

Length of the text to analyze.

FontCollection baseFontCollection

Default font collection to use.

string baseFamilyName

Family name of the base font. If you pass null, no matching will be done against the family.

FontWeight baseWeight

Desired weight.

FontStyle baseStyle

Desired style.

FontStretch baseStretch

Desired stretch.

int mappedLength

Length of text mapped to the mapped font. This will always be less or equal to the input text length and greater than zero (if the text length is non-zero) so that the caller advances at least one character each call.

float scale

Scale factor to multiply the em size of the returned font by.

Returns
Type Description
Font

The font that should be used to render the first mappedLength characters of the text. If it returns NULL, then no known font can render the text, and mappedLength is the number of unsupported characters to skip.

MapCharacters(IntPtr, int, int, FontCollection, string, FontWeight, FontStyle, FontStretch, out int, out float)

HRESULT IDWriteFontFallback::MapCharacters(IDWriteTextAnalysisSource* source, UINT32 textPosition, UINT32 textLength, [in, optional] IDWriteFontCollection* baseFontCollection, [in, optional] wchar_t* baseFamilyName, DWRITE_FONT_WEIGHT baseWeight, DWRITE_FONT_STYLE baseStyle, DWRITE_FONT_STRETCH baseStretch, [out] UINT32* mappedLength, [out] IDWriteFont** mappedFont, [out] FLOAT* scale)

Declaration
public Font MapCharacters(IntPtr source, int textPosition, int textLength, FontCollection baseFontCollection, string baseFamilyName, FontWeight baseWeight, FontStyle baseStyle, FontStretch baseStretch, out int mappedLength, out float scale)
Parameters
Type Name Description
IntPtr source
int textPosition
int textLength
FontCollection baseFontCollection
string baseFamilyName
FontWeight baseWeight
FontStyle baseStyle
FontStretch baseStretch
int mappedLength
float scale
Returns
Type Description
Font

MapCharacters(IntPtr, int, int, IntPtr, IntPtr, FontWeight, FontStyle, FontStretch, out int, out float)

HRESULT IDWriteFontFallback::MapCharacters(IDWriteTextAnalysisSource* source, UINT32 textPosition, UINT32 textLength, [in, optional] IDWriteFontCollection* baseFontCollection, [in, optional] wchar_t* baseFamilyName, DWRITE_FONT_WEIGHT baseWeight, DWRITE_FONT_STYLE baseStyle, DWRITE_FONT_STRETCH baseStretch, [out] UINT32* mappedLength, [out] IDWriteFont** mappedFont, [out] FLOAT* scale)

Declaration
public Font MapCharacters(IntPtr source, int textPosition, int textLength, IntPtr baseFontCollection, IntPtr baseFamilyName, FontWeight baseWeight, FontStyle baseStyle, FontStretch baseStretch, out int mappedLength, out float scale)
Parameters
Type Name Description
IntPtr source
int textPosition
int textLength
IntPtr baseFontCollection
IntPtr baseFamilyName
FontWeight baseWeight
FontStyle baseStyle
FontStretch baseStretch
int mappedLength
float scale
Returns
Type Description
Font