Package com.iizix.prop.font
Enum Class FontFormat
- All Implemented Interfaces:
Serializable
,Comparable<FontFormat>
,Constable
Available font formats.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Enum Constant Summary
Field Summary
Method Summary
Modifier and TypeMethodDescriptionstatic final FontFormat
fromFileExtension
(String fileName) Returns the format for the file extension.static final FontFormat
fromTypeName
(String typeName) Returns the format for the format type name-static FontFormat
Returns the enum constant of this class with the specified name.static FontFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
UNDEFINED
Undefined format.WOFF2
The format: WOFF2.WOFF
The format: WOFF.TrueType
The format: TrueType.OpenType
The format: OpenType.EmbeddedOpenType
The format: Embedded Open Type (EOT).SVG
The format: SVG.
Field Details
ext
File extension, null for undefined.type
The type name of the format in CSS, e.g. "truetype" or "embedded-opentype".FORMATS
The format type names in an array.
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
fromFileExtension
Returns the format for the file extension.- Parameters:
fileName
- The file name.- Returns:
- A font format, perhaps UNDEFINED.
fromTypeName
Returns the format for the format type name-- Parameters:
typeName
- The type name.- Returns:
- A font format, perhaps UNDEFINED.