[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DirectWrite.FontFallback

Class FontFallback

Namespace
GrapeCity.Documents.DX.DirectWrite
Assembly
GcDocs.DX.Windows.dll

IDWriteFontFallback

[Guid("EFA008F9-F7A1-48BF-B05C-F224713CC0FF")]
public class FontFallback : ComObject, IDisposable, IUnknown
Inheritance
object
FontFallback
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

FontFallback(IntPtr)

Initializes a new instance of the FontFallback class.

public FontFallback(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Methods

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

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)

Parameters

source ITextAnalysisSource

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

Desired weight.

baseStyle FontStyle

Desired style.

baseStretch FontStretch

Desired stretch.

mappedLength int

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.

scale float

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

Returns

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)

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

source System.IntPtr
textPosition int
textLength int
baseFontCollection FontCollection
baseFamilyName string
baseWeight FontWeight
baseStyle FontStyle
baseStretch FontStretch
mappedLength int
scale float

Returns

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)

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

source System.IntPtr
textPosition int
textLength int
baseFontCollection System.IntPtr
baseFamilyName System.IntPtr
baseWeight FontWeight
baseStyle FontStyle
baseStretch FontStretch
mappedLength int
scale float

Returns

Font

Operators

explicit operator FontFallback(IntPtr)

Performs an explicit conversion from System.IntPtr to FontFallback.

public static explicit operator FontFallback(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

FontFallback