Class FontDescription
provide metadata about a font.
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public class FontDescription
Properties
| Improve this Doc View SourceFontFamilyInvariantCulture
Gets the name of the font family in the invariant culture.
Declaration
public string FontFamilyInvariantCulture { get; }
Property Value
Type | Description |
---|---|
String | The font name |
FontNameInvariantCulture
Gets the name of the font in the invariant culture.
Declaration
public string FontNameInvariantCulture { get; }
Property Value
Type | Description |
---|---|
String | The font name |
FontSubFamilyNameInvariantCulture
Gets the font sub family in the invariant culture.
Declaration
public string FontSubFamilyNameInvariantCulture { get; }
Property Value
Type | Description |
---|---|
String | The font sub family name |
Style
Gets the style.
Declaration
public FontStyle Style { get; }
Property Value
Type | Description |
---|---|
FontStyle | The style. |
Methods
| Improve this Doc View SourceFontFamily(CultureInfo)
Gets the name of the font family .
Declaration
public string FontFamily(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
CultureInfo | culture | The culture to load metadata in. |
Returns
Type | Description |
---|---|
String | The font family name |
FontName(CultureInfo)
Gets the name of the font.
Declaration
public string FontName(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
CultureInfo | culture | The culture to load metadata in. |
Returns
Type | Description |
---|---|
String | The font name |
FontSubFamilyName(CultureInfo)
Gets the font sub family.
Declaration
public string FontSubFamilyName(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
CultureInfo | culture | The culture to load metadata in. |
Returns
Type | Description |
---|---|
String | The font sub family name |
LoadDescription(Stream)
Reads a FontDescription from the specified stream.
Declaration
public static FontDescription LoadDescription(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream. |
Returns
Type | Description |
---|---|
FontDescription |
LoadDescription(String)
Reads a FontDescription from the specified stream.
Declaration
public static FontDescription LoadDescription(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The file path. |
Returns
Type | Description |
---|---|
FontDescription |
LoadFontCollectionDescriptions(Stream)
Reads all the FontDescriptions from the specified stream (typically a .ttc file like simsun.ttc).
Declaration
public static FontDescription[] LoadFontCollectionDescriptions(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to read the font collection from. |
Returns
Type | Description |
---|---|
FontDescription[] |
LoadFontCollectionDescriptions(String)
Reads all the FontDescriptions from the file at the specified path (typically a .ttc file like simsun.ttc).
Declaration
public static FontDescription[] LoadFontCollectionDescriptions(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The file path. |
Returns
Type | Description |
---|---|
FontDescription[] |