FontType
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.editor.htmlcss.resources.IResourceType
public class FontType implements IResourceType
Represents one supportable font type
| Constructor | Description |
|---|---|
| FontType() |
| Method | Description |
|---|---|
| getUndefined() | Special value, which marks undefined, unknown or unsupported font resource |
| getWoff() | Represents a WOFF (Web Open Font Format) font type |
| getWoff2() | Represents a WOFF2 (Web Open Font Format version 2) font type |
| getTtf() | Represents a TTF (TrueType Font) font type |
| getEot() | Represents a EOT (Embedded OpenType) font type |
| getOtf() | Represents a OTF (OpenType Font) font type |
| getCssName() | Returns CSS-compatible name of this font type, which is used in the |
| getFormalName() | Returns a formal name of this font type |
| getFileExtension() | Filename extension (without dot character) for this font type |
| getFontFormat() | Font format for @font-face format |
| getMimeCode() | MIME code of a particular font type |
| parseFromCssName(String name) | Returns FontType value, which is equivalent of specified CSS-compatible name of the font type |
| parseFromFilenameWithExtension(String filename) | Returns FontType value, which is equivalent of filename extension, which is extracted from specified filename |
| parseFromMime(String mimeCode) | Returns FontType value, which is equivalent of specified MIME-code |
| 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”) |
| equals(FontType other) | Determines whether this instance is equal with specified “FontType” instance |
| equals(Object obj) | Determines whether this instance is equal with specified uncasted object, which presumably is another “FontType” instance |
| op_Equality(FontType first, FontType second) | Checks whether two “FontType” values are equal |
| op_Inequality(FontType first, FontType second) | Checks whether two “FontType” values are not equal |
| hashCode() | Returns a hash-code, which is a constant number for this specific value type |
public FontType()
public static FontType getUndefined()
Special value, which marks undefined, unknown or unsupported font resource
Returns: FontType -
public static FontType getWoff()
Represents a WOFF (Web Open Font Format) font type
Returns: FontType -
public static FontType getWoff2()
Represents a WOFF2 (Web Open Font Format version 2) font type
Returns: FontType -
public static FontType getTtf()
Represents a TTF (TrueType Font) font type
Returns: FontType -
public static FontType getEot()
Represents a EOT (Embedded OpenType) font type
Returns: FontType -
public static FontType getOtf()
Represents a OTF (OpenType Font) font type
Returns: FontType -
public final String getCssName()
Returns CSS-compatible name of this font type, which is used in the
Returns: java.lang.String -
public final String getFormalName()
Returns a formal name of this font type
Returns: java.lang.String -
public final String getFileExtension()
Filename extension (without dot character) for this font type
Returns: java.lang.String -
public final String getFontFormat()
Font format for @font-face format
Returns: java.lang.String -
public final String getMimeCode()
MIME code of a particular font type
Returns: java.lang.String -
public static FontType parseFromCssName(String name)
Returns FontType value, which is equivalent of specified CSS-compatible name of the font type
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String | CSS-compatible name of the font type |
Returns: FontType - Valid FontType value on success or FontType.Undefined on failure
public static FontType parseFromFilenameWithExtension(String filename)
Returns FontType value, which is equivalent of filename extension, which is extracted from specified filename
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filename | java.lang.String | Filename with extension, may be a full name |
Returns: FontType - Valid FontType value on success or FontType.Undefined on failure
public static FontType parseFromMime(String mimeCode)
Returns FontType value, which is equivalent of specified MIME-code
Parameters:
| Parameter | Type | Description |
|---|---|---|
| mimeCode | java.lang.String | MIME-code |
Returns: FontType - Valid FontType value on success or FontType.Undefined on failure
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”)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fonts | FontType[] | One or more FontType values, NULL or empty collection is not allowed |
Returns: FontType - First FontType value from specified collection, that is not Undefined, or Undefined, if all items are Undefined
public final boolean equals(FontType other)
Determines whether this instance is equal with specified “FontType” instance
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | FontType | Other FontType instance to check with this |
Returns: boolean - True if are equal, false if are unequal
public boolean equals(Object obj)
Determines whether this instance is equal with specified uncasted object, which presumably is another “FontType” instance
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object | Other instance presumably of FontType struct, that was boxed to System.Object |
Returns: boolean - True if are equal, false if are unequal
public static boolean op_Equality(FontType first, FontType second)
Checks whether two “FontType” values are equal
Parameters:
| Parameter | Type | Description |
|---|---|---|
| first | FontType | First FontType to check |
| second | FontType | Second FontType to check |
Returns: boolean - True if are equal, false if are unequal
public static boolean op_Inequality(FontType first, FontType second)
Checks whether two “FontType” values are not equal
Parameters:
| Parameter | Type | Description |
|---|---|---|
| first | FontType | First FontType to check |
| second | FontType | Second FontType to check |
Returns: boolean - True if are equal, false if are unequal
public int hashCode()
Returns a hash-code, which is a constant number for this specific value type
Returns: int - 4-byte signed integer, 0 for Undefined value
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.