[]
IDWriteFontFallback
[Guid("EFA008F9-F7A1-48BF-B05C-F224713CC0FF")]
public class FontFallback : ComObject, IDisposable, IUnknown
Initializes a new instance of the FontFallback class.
public FontFallback(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
Determines an appropriate font to use to render the range of text.
public Font MapCharacters(ITextAnalysisSource source, int textPosition, int textLength, FontCollection baseFontCollection, string baseFamilyName, FontWeight baseWeight, FontStyle baseStyle, FontStretch baseStretch, out int mappedLength, out float scale)
source
ITextAnalysisSourceThe text source implementation holds the text and locale.
textPosition
intStarting position to analyze.
textLength
intLength of the text to analyze.
baseFontCollection
FontCollectionDefault font collection to use.
baseFamilyName
stringFamily name of the base font. If you pass null, no matching will be done against the family.
baseWeight
FontWeightDesired weight.
baseStyle
FontStyleDesired style.
baseStretch
FontStretchDesired stretch.
mappedLength
intLength 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.
scale
floatScale factor to multiply the em size of the returned font by.
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.
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)
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)
source
System.IntPtrtextPosition
inttextLength
intbaseFontCollection
FontCollectionbaseFamilyName
stringbaseWeight
FontWeightbaseStyle
FontStylebaseStretch
FontStretchmappedLength
intscale
floatHRESULT 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)
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)
source
System.IntPtrtextPosition
inttextLength
intbaseFontCollection
System.IntPtrbaseFamilyName
System.IntPtrbaseWeight
FontWeightbaseStyle
FontStylebaseStretch
FontStretchmappedLength
intscale
floatPerforms an explicit conversion from System.IntPtr to FontFallback.
public static explicit operator FontFallback(IntPtr nativePointer)
nativePointer
System.IntPtr