FontManager Class
Definition
The font manager is used to query the system's installed fonts and is responsible for caching loaded fonts. It is also responsible for the font fallback.
public class FontManager
Constructors
| Name | Description |
|---|---|
| FontManager | No summary available. |
FontManager Constructor
public FontManager(Avalonia.Platform.IFontManagerImpl platformImpl)
Parameters
platformImpl Avalonia.Platform.IFontManagerImpl
Methods
| Name | Description |
|---|---|
| AddFontCollection | Add a font collection to the manager. |
| RemoveFontCollection | Removes the font collection that corresponds to specified key. |
| TryGetGlyphTypeface | No summary available. |
| TryMatchCharacter | No summary available. |
AddFontCollection Method
Add a font collection to the manager.
public void AddFontCollection(Avalonia.Media.Fonts.IFontCollection fontCollection)
Parameters
fontCollection Avalonia.Media.Fonts.IFontCollection
The font collection.
Remarks
If a font collection's key is already present the collection is replaced.
Exceptions
RemoveFontCollection Method
Removes the font collection that corresponds to specified key.
public void RemoveFontCollection(Uri key)
Parameters
key Uri
The font collection's key.
TryGetGlyphTypeface Method
public bool TryGetGlyphTypeface(Avalonia.Media.Typeface typeface, Avalonia.Media.GlyphTypeface& glyphTypeface)
Parameters
typeface Avalonia.Media.Typeface
glyphTypeface Avalonia.Media.GlyphTypeface&
Returns
bool
TryMatchCharacter Method
public bool TryMatchCharacter(int codepoint, Avalonia.Media.FontStyle fontStyle, Avalonia.Media.FontWeight fontWeight, Avalonia.Media.FontStretch fontStretch, Avalonia.Media.FontFamily fontFamily, System.Globalization.CultureInfo culture, Avalonia.Media.Typeface& typeface)
Parameters
codepoint int
fontStyle Avalonia.Media.FontStyle
fontWeight Avalonia.Media.FontWeight
fontStretch Avalonia.Media.FontStretch
fontFamily Avalonia.Media.FontFamily
culture System.Globalization.CultureInfo
typeface Avalonia.Media.Typeface&
Returns
bool
Properties
| Name | Description |
|---|---|
| Current | Get the current font manager instance. |
| DefaultFontFamily | Gets the system's default font family. |
| SystemFonts | Get all system fonts. |
Current Property
Get the current font manager instance.
public Avalonia.Media.FontManager Current { get; set; }
DefaultFontFamily Property
Gets the system's default font family.
public Avalonia.Media.FontFamily DefaultFontFamily { get; set; }
SystemFonts Property
Get all system fonts.
public Avalonia.Media.Fonts.IFontCollection SystemFonts { get; set; }
Fields
| Name | Description |
|---|---|
| CompositeFontScheme | No summary available. |
| FontCollectionScheme | No summary available. |
| SystemFontScheme | No summary available. |
CompositeFontScheme Field
public string CompositeFontScheme
FontCollectionScheme Field
public string FontCollectionScheme
SystemFontScheme Field
public string SystemFontScheme