Interface IReadOnlyFontCollection
A readonly collection of fonts.
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public interface IReadOnlyFontCollection
Properties
| Improve this Doc View SourceFamilies
Gets the collection of FontFamily objects associated with this FontCollection in the invariant culture.
Declaration
IEnumerable<FontFamily> Families { get; }
Property Value
Type | Description |
---|---|
IEnumerable<FontFamily> | The families. |
Methods
| Improve this Doc View SourceFamiliesByCulture(CultureInfo)
Gets the collection of FontFamily objects associated with this FontCollection.
Declaration
IEnumerable<FontFamily> FamiliesByCulture(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
CultureInfo | culture | The culture to use while getting the family name from the installed set of fonts. |
Returns
Type | Description |
---|---|
IEnumerable<FontFamily> | The set of fonts families using the fonts culture aware font name |
Find(String)
Finds the specified font family using the invariant culture font family name.
Declaration
FontFamily Find(string fontFamily)
Parameters
Type | Name | Description |
---|---|---|
String | fontFamily | The font family. |
Returns
Type | Description |
---|---|
FontFamily | The family if installed otherwise throws FontFamilyNotFoundException |
Find(String, CultureInfo)
Finds the specified font family.
Declaration
FontFamily Find(string fontFamily, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
String | fontFamily | The font family. |
CultureInfo | culture | The culture to use while getting the family name from the installed set of fonts. |
Returns
Type | Description |
---|---|
FontFamily | The family if installed otherwise throws FontFamilyNotFoundException |
TryFind(String, out FontFamily)
Finds the specified font family using the invariant culture font family name.
Declaration
bool TryFind(string fontFamily, out FontFamily family)
Parameters
Type | Name | Description |
---|---|---|
String | fontFamily | The font family to find. |
FontFamily | family | The found family. |
Returns
Type | Description |
---|---|
Boolean | true if a font of that family has been installed into the font collection. |
TryFind(String, CultureInfo, out FontFamily)
Finds the specified font family.
Declaration
bool TryFind(string fontFamily, CultureInfo culture, out FontFamily family)
Parameters
Type | Name | Description |
---|---|---|
String | fontFamily | The font family to find. |
CultureInfo | culture | The culture to use while getting the family name from the installed set of fonts. |
FontFamily | family | The found family. |
Returns
Type | Description |
---|---|
Boolean | true if a font of that family has been installed into the font collection. |