Class FontFallback
- Namespace
- SharpDX.DirectWrite
- Assembly
- SharpDX.Direct2D1.dll
[Guid("EFA008F9-F7A1-48BF-B05C-F224713CC0FF")]
public class FontFallback : ComObject
- Inheritance
-
FontFallback
Constructors
FontFallback(nint)
public FontFallback(nint nativePtr)
Parameters
nativePtr
nint
Methods
MapCharacters(TextAnalysisSource, int, int, FontCollection, string, FontWeight, FontStyle, FontStretch, out int, out Font, out float)
Determines an appropriate font to use to render the beginning range of text.
public void MapCharacters(TextAnalysisSource analysisSource, int textPosition, int textLength, FontCollection baseFontCollection, string baseFamilyName, FontWeight baseWeight, FontStyle baseStyle, FontStretch baseStretch, out int mappedLength, out Font mappedFont, out float scale)
Parameters
analysisSource
TextAnalysisSourceThe 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
FontWeightThe desired weight.
baseStyle
FontStyleThe desired style.
baseStretch
FontStretchThe desired stretch.
mappedLength
intLength of text mapped to the mapped font. This will always be less than or equal to the text length and greater than zero (if the text length is non-zero) so the caller advances at least one character.
mappedFont
FontThe font that should be used to render the first mappedLength characters of the text. If it returns
null
, that means that no font can render the text, and mappedLength is the number of characters to skip (rendered with a missing glyph).scale
floatScale factor to multiply the em size of the returned font by.
Operators
explicit operator FontFallback(nint)
public static explicit operator FontFallback(nint nativePtr)
Parameters
nativePtr
nint