Enum Class Typeface

java.lang.Object
java.lang.Enum<Typeface>
com.teamten.font.Typeface
All Implemented Interfaces:
Serializable, Comparable<Typeface>, Constable

public enum Typeface extends Enum<Typeface>
Tracks sets of fonts for a given typeface.
  • Enum Constant Details

    • TIMES_NEW_ROMAN

      public static final Typeface TIMES_NEW_ROMAN
    • COURIER_NEW

      public static final Typeface COURIER_NEW
    • ROBOTO_MONO

      public static final Typeface ROBOTO_MONO
    • MINION

      public static final Typeface MINION
    • ALEGREYA

      public static final Typeface ALEGREYA
      https://fonts.google.com/specimen/Alegreya
    • IM_FELL_ENGLISH

      public static final Typeface IM_FELL_ENGLISH
      https://fonts.google.com/specimen/IM+Fell+English
    • SORTS_MILL_GOUDY

      public static final Typeface SORTS_MILL_GOUDY
      https://fonts.google.com/specimen/Sorts+Mill+Goudy
  • Method Details

    • values

      public static Typeface[] 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

      public static Typeface valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • get

      public FontName get(FontVariant fontVariant)
      Return the font name for this variant, or null if the typeface does not define one.
    • parse

      public static Typeface parse(String s)
      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.