Class FontDescription
Provides basic descriptive metadata for the font.
public class FontDescription
- Inheritance
-
FontDescription
- Inherited Members
Properties
FontFamilyInvariantCulture
Gets the name of the font family in the invariant culture.
public string FontFamilyInvariantCulture { get; }
Property Value
FontNameInvariantCulture
Gets the name of the font in the invariant culture.
public string FontNameInvariantCulture { get; }
Property Value
FontSubFamilyNameInvariantCulture
Gets the font sub family in the invariant culture.
public string FontSubFamilyNameInvariantCulture { get; }
Property Value
Style
Gets the style.
public FontStyle Style { get; }
Property Value
Methods
FontFamily(CultureInfo)
Gets the name of the font family.
public string FontFamily(CultureInfo culture)
Parameters
cultureCultureInfoThe culture to load metadata in.
Returns
- string
The font family name.
FontName(CultureInfo)
Gets the name of the font.
public string FontName(CultureInfo culture)
Parameters
cultureCultureInfoThe culture to load metadata in.
Returns
- string
The font name.
FontSubFamilyName(CultureInfo)
Gets the font sub family.
public string FontSubFamilyName(CultureInfo culture)
Parameters
cultureCultureInfoThe culture to load metadata in.
Returns
- string
The font sub family name.
GetNameById(CultureInfo, KnownNameIds)
Gets the name matching the given culture and id. If InvariantCulture is passed this method will return the first name matching the id.
public string GetNameById(CultureInfo culture, KnownNameIds nameId)
Parameters
cultureCultureInfoThe culture to load metadata in.
nameIdKnownNameIdsThe name id to match.
Returns
LoadDescription(Stream)
Reads a FontDescription from the specified stream.
public static FontDescription LoadDescription(Stream stream)
Parameters
streamStreamThe stream.
Returns
LoadDescription(string)
Reads a FontDescription from the specified stream.
public static FontDescription LoadDescription(string path)
Parameters
pathstringThe file path.
Returns
LoadFontCollectionDescriptions(Stream)
Reads all the FontDescriptions from the specified stream (typically a .ttc file like simsun.ttc).
public static ReadOnlyMemory<FontDescription> LoadFontCollectionDescriptions(Stream stream)
Parameters
streamStreamThe stream to read the font collection from.
Returns
- ReadOnlyMemory<FontDescription>
A read-only memory region containing the font descriptions.
LoadFontCollectionDescriptions(string)
Reads all the FontDescriptions from the file at the specified path (typically a .ttc file like simsun.ttc).
public static ReadOnlyMemory<FontDescription> LoadFontCollectionDescriptions(string path)
Parameters
pathstringThe file path.
Returns
- ReadOnlyMemory<FontDescription>
A read-only memory region containing the font descriptions.