public class FontType extends Object implements IResourceType
Represents one supportable font type
Constructor and Description |
---|
FontType() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(FontType other)
Determines whether this instance is equal with specified "FontType"
instance
|
boolean |
equals(Object obj)
Determines whether this instance is equal with specified uncasted object,
which presumably is another "FontType" instance
|
String |
getCssName()
Returns CSS-compatible name of this font type, which is used in the
|
static FontType |
getEot()
Represents a EOT (Embedded OpenType) font type
|
String |
getFileExtension()
Filename extension (without dot character) for this font type
|
static FontType |
getFirstDefined(FontType... fonts)
Returns a first font type from specified set, which is not an "Undefined"
value, or "Undefined" font type otherwise (when all items are
"Undefined")
|
String |
getFontFormat()
Font format for @font-face format
|
String |
getFormalName()
Returns a formal name of this font type
|
String |
getMimeCode()
MIME code of a particular font type
|
static FontType |
getOtf()
Represents a OTF (OpenType Font) font type
|
static FontType |
getTtf()
Represents a TTF (TrueType Font) font type
|
static FontType |
getUndefined()
Special value, which marks undefined, unknown or unsupported font
resource
|
static FontType |
getWoff()
Represents a WOFF (Web Open Font Format) font type
|
static FontType |
getWoff2()
Represents a WOFF2 (Web Open Font Format version 2) font type
|
int |
hashCode()
Returns a hash-code, which is a constant number for this specific value
type
|
static boolean |
op_Equality(FontType first,
FontType second)
Checks whether two "FontType" values are equal
|
static boolean |
op_Inequality(FontType first,
FontType second)
Checks whether two "FontType" values are not equal
|
static FontType |
parseFromCssName(String name)
Returns FontType value, which is equivalent of specified CSS-compatible
name of the font type
|
static FontType |
parseFromFilenameWithExtension(String filename)
Returns FontType value, which is equivalent of filename extension, which
is extracted from specified filename
|
static FontType |
parseFromMime(String mimeCode)
Returns FontType value, which is equivalent of specified MIME-code
|
public final boolean equals(FontType other)
Determines whether this instance is equal with specified "FontType" instance
other
- Other FontType instance to check with thispublic boolean equals(Object obj)
Determines whether this instance is equal with specified uncasted object, which presumably is another "FontType" instance
public final String getCssName()
Returns CSS-compatible name of this font type, which is used in the
public static FontType getEot()
Represents a EOT (Embedded OpenType) font type
public final String getFileExtension()
Filename extension (without dot character) for this font type
getFileExtension
in interface IResourceType
public static FontType getFirstDefined(FontType... fonts)
Returns a first font type from specified set, which is not an "Undefined" value, or "Undefined" font type otherwise (when all items are "Undefined")
fonts
- One or more FontType values, NULL or empty collection is not
allowedpublic final String getFontFormat()
Font format for @font-face format
public final String getFormalName()
Returns a formal name of this font type
getFormalName
in interface IResourceType
public final String getMimeCode()
MIME code of a particular font type
getMimeCode
in interface IResourceType
public static FontType getOtf()
Represents a OTF (OpenType Font) font type
public static FontType getTtf()
Represents a TTF (TrueType Font) font type
public static FontType getUndefined()
Special value, which marks undefined, unknown or unsupported font resource
public static FontType getWoff()
Represents a WOFF (Web Open Font Format) font type
public static FontType getWoff2()
Represents a WOFF2 (Web Open Font Format version 2) font type
public int hashCode()
Returns a hash-code, which is a constant number for this specific value type
public static boolean op_Equality(FontType first, FontType second)
Checks whether two "FontType" values are equal
first
- First FontType to checksecond
- Second FontType to checkpublic static boolean op_Inequality(FontType first, FontType second)
Checks whether two "FontType" values are not equal
first
- First FontType to checksecond
- Second FontType to checkpublic static FontType parseFromCssName(String name)
Returns FontType value, which is equivalent of specified CSS-compatible name of the font type
name
- CSS-compatible name of the font typepublic static FontType parseFromFilenameWithExtension(String filename)
Returns FontType value, which is equivalent of filename extension, which is extracted from specified filename
filename
- Filename with extension, may be a full name