Table of Contents

Interface IFontManagerImpl

Namespace
Avalonia.Platform
Assembly
Avalonia.Base.dll
[Unstable]
public interface IFontManagerImpl

Methods

GetDefaultFontFamilyName()

Gets the system's default font family's name.

string GetDefaultFontFamilyName()

Returns

string

GetInstalledFontFamilyNames(bool)

Get all installed fonts in the system.
If true the font collection is updated.
string[] GetInstalledFontFamilyNames(bool checkForUpdates = false)

Parameters

checkForUpdates bool

Returns

string[]

TryCreateGlyphTypeface(Stream, FontSimulations, out IGlyphTypeface?)

Tries to create a glyph typeface from specified stream.

bool TryCreateGlyphTypeface(Stream stream, FontSimulations fontSimulations, out IGlyphTypeface? glyphTypeface)

Parameters

stream Stream

A stream that holds the font's data.

fontSimulations FontSimulations

Specifies algorithmic style simulations.

glyphTypeface IGlyphTypeface

The created glyphTypeface

Returns

bool

True, if the IFontManagerImpl could create the glyph typeface, False otherwise.

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

Tries to get a glyph typeface for specified parameters.

bool TryCreateGlyphTypeface(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 weiht.

stretch FontStretch

The font stretch.

glyphTypeface IGlyphTypeface

The created glyphTypeface

Returns

bool

True, if the IFontManagerImpl could create the glyph typeface, False otherwise.

TryMatchCharacter(int, FontStyle, FontWeight, FontStretch, CultureInfo?, out Typeface)

Tries to match a specified character to a typeface that supports specified font properties.

bool TryMatchCharacter(int codepoint, FontStyle fontStyle, FontWeight fontWeight, FontStretch fontStretch, CultureInfo? culture, out Typeface typeface)

Parameters

codepoint int

The codepoint to match against.

fontStyle FontStyle

The font style.

fontWeight FontWeight

The font weight.

fontStretch FontStretch

The font stretch.

culture CultureInfo

The culture.

typeface Typeface

The matching typeface.

Returns

bool

True, if the IFontManagerImpl could match the character to specified parameters, False otherwise.