FontFamily Class
Definition
public class FontFamily
Constructors
| Name | Description |
|---|---|
| FontFamily (2 overloads) | Initializes a new instance of the Avalonia.Media.FontFamily class. |
FontFamily overloads
FontFamily Constructor
Initializes a new instance of the Avalonia.Media.FontFamily class.
public FontFamily(string name)
Parameters
name string
The name of the Avalonia.Media.FontFamily.
FontFamily Constructor
Initializes a new instance of the Avalonia.Media.FontFamily class.
public FontFamily(Uri baseUri, string name)
Parameters
baseUri Uri
Specifies the base uri that is used to resolve font family assets.
name string
The name of the Avalonia.Media.FontFamily.
Exceptions
Methods
| Name | Description |
|---|---|
| Equals | No summary available. |
| GetHashCode | Returns a hash code for this instance. |
| Parse (2 overloads) | Parses a Avalonia.Media.FontFamily string. |
| ToString | Returns a string that represents this instance. |
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetHashCode Method
Returns a hash code for this instance.
public int GetHashCode()
Returns
int
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Parse overloads
Parse Method
Parses a Avalonia.Media.FontFamily string.
public Avalonia.Media.FontFamily Parse(string s)
Parameters
s string
The Avalonia.Media.FontFamily string.
Returns
Exceptions
Parse Method
Parses a Avalonia.Media.FontFamily string.
public Avalonia.Media.FontFamily Parse(string s, Uri baseUri)
Parameters
s string
The Avalonia.Media.FontFamily string.
baseUri Uri
Specifies the base uri that is used to resolve font family assets.
Returns
Exceptions
ToString Method
Returns a string that represents this instance.
public string ToString()
Returns
string
A string that represents this instance.
Properties
| Name | Description |
|---|---|
| Default | Represents the default font family |
| FamilyNames | Gets the family names. |
| FamilyTypefaces | Gets the typefaces for this font family. |
| Key | Gets the key for associated assets. |
| Name | Gets the primary family name of the font family. |
Default Property
Represents the default font family
public Avalonia.Media.FontFamily Default { get; set; }
FamilyNames Property
Gets the family names.
public Avalonia.Media.Fonts.FamilyNameCollection FamilyNames { get; set; }
Value
The family familyNames.
FamilyTypefaces Property
Gets the typefaces for this font family.
public System.Collections.Generic.IReadOnlyList<Avalonia.Media.Typeface> FamilyTypefaces { get; set; }
Key Property
Gets the key for associated assets.
public Avalonia.Media.Fonts.FontFamilyKey Key { get; set; }
Value
The family key.
Remarks
Key is only used for custom fonts.
Name Property
Gets the primary family name of the font family.
public string Name { get; set; }
Value
The primary name of the font family.
Fields
| Name | Description |
|---|---|
| DefaultFontFamilyName | No summary available. |
DefaultFontFamilyName Field
public string DefaultFontFamilyName