FontType

FontType structure

Represents one supportable font type

public struct FontType : IEquatable<FontType>, IResourceType

Properties

Name Description
static Eot { get; } Represents a EOT (Embedded OpenType) font type
static Otf { get; } Represents a OTF (OpenType Font) font type
static Ttf { get; } Represents a TTF (TrueType Font) font type
static Undefined { get; } Special value, which marks undefined, unknown or unsupported font resource
static Woff { get; } Represents a WOFF (Web Open Font Format) font type
static Woff2 { get; } Represents a WOFF2 (Web Open Font Format version 2) font type
CssName { get; } Returns CSS-compatible name of this font type, which is used in the @font-face at-rule
FileExtension { get; } Filename extension (without dot character) for this font type
FontFormat { get; } Font format for @font-face format
FormalName { get; } Returns a formal name of this font type
MimeCode { get; } MIME code of a particular font type

Methods

Name Description
static GetFirstDefined(params FontType[]) Returns a first font type from specified set, which is not an “Undefined” value, or “Undefined” font type otherwise (when all items are “Undefined”)
static ParseFromCssName(string) Returns FontType value, which is equivalent of specified CSS-compatible name of the font type
static ParseFromFilenameWithExtension(string) Returns FontType value, which is equivalent of filename extension, which is extracted from specified filename
static ParseFromMime(string) Returns FontType value, which is equivalent of specified MIME-code
Equals(FontType) Determines whether this instance is equal with specified “FontType” instance
override Equals(object) Determines whether this instance is equal with specified uncasted object, which presumably is another “FontType” instance
override GetHashCode() Returns a hash-code, which is a constant number for this specific value type
operator == Checks whether two “FontType” values are equal
operator != Checks whether two “FontType” values are not equal

See Also