Package com.teamten.font
Enum Class Typeface
- All Implemented Interfaces:
Serializable
,Comparable<Typeface>
,Constable
Tracks sets of fonts for a given typeface.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionhttps://fonts.google.com/specimen/Alegreyahttps://fonts.google.com/specimen/IM+Fell+Englishhttps://fonts.google.com/specimen/Sorts+Mill+Goudy -
Method Summary
Modifier and TypeMethodDescriptionget
(FontVariant fontVariant) Return the font name for this variant, or null if the typeface does not define one.static Typeface
Parses a typeface name by converting it to upper case and transforming spaces and hyphens to underscores, then looking it up in this enum.static Typeface
Returns the enum constant of this class with the specified name.static Typeface[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TIMES_NEW_ROMAN
-
COURIER_NEW
-
ROBOTO_MONO
-
MINION
-
ALEGREYA
https://fonts.google.com/specimen/Alegreya -
IM_FELL_ENGLISH
https://fonts.google.com/specimen/IM+Fell+English -
SORTS_MILL_GOUDY
https://fonts.google.com/specimen/Sorts+Mill+Goudy
-
-
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
-
get
Return the font name for this variant, or null if the typeface does not define one. -
parse
Parses a typeface name by converting it to upper case and transforming spaces and hyphens to underscores, then looking it up in this enum.- Throws:
IllegalArgumentException
- if the typeface is not found.
-