Table of Contents

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 TextAnalysisSource

The text source implementation holds the text and locale.

textPosition int

Starting position to analyze.

textLength int

Length of the text to analyze.

baseFontCollection FontCollection

Default font collection to use.

baseFamilyName string

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

baseWeight FontWeight

The desired weight.

baseStyle FontStyle

The desired style.

baseStretch FontStretch

The desired stretch.

mappedLength int

Length 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 Font

The 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 float

Scale 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

Returns

FontFallback