Table of Contents

Class EmbeddedFontCollection

Namespace
Avalonia.Media.Fonts
Assembly
Avalonia.Base.dll
public class EmbeddedFontCollection : FontCollectionBase, IFontCollection, IReadOnlyList<FontFamily>, IReadOnlyCollection<FontFamily>, IEnumerable<FontFamily>, IEnumerable, IDisposable
Inheritance
EmbeddedFontCollection
Implements
Inherited Members

Constructors

EmbeddedFontCollection(Uri, Uri)

public EmbeddedFontCollection(Uri key, Uri source)

Parameters

key Uri
source Uri

Properties

Count

public override int Count { get; }

Property Value

int

this[int]

public override FontFamily this[int index] { get; }

Parameters

index int

Property Value

FontFamily

Key

Get the font collection's key.

public override Uri Key { get; }

Property Value

Uri

Methods

GetEnumerator()

public override IEnumerator<FontFamily> GetEnumerator()

Returns

IEnumerator<FontFamily>

Initialize(IFontManagerImpl)

Initializes the font collection.

public override void Initialize(IFontManagerImpl fontManager)

Parameters

fontManager IFontManagerImpl

The font manager the collection is registered with.

TryGetGlyphTypeface(string, FontStyle, FontWeight, FontStretch, out IGlyphTypeface?)

Try to get a glyph typeface for given parameters.

public override bool TryGetGlyphTypeface(string familyName, FontStyle style, FontWeight weight, FontStretch stretch, out IGlyphTypeface? glyphTypeface)

Parameters

familyName string

The family name.

style FontStyle

The font style.

weight FontWeight

The font weight.

stretch FontStretch

The font stretch.

glyphTypeface IGlyphTypeface

The glyph typeface.

Returns

bool

Returns true if a glyph typface can be found; otherwise, false