Enum Class FontFormat

java.lang.Object
java.lang.Enum<FontFormat>
com.iizix.prop.font.FontFormat
All Implemented Interfaces:
Serializable, Comparable<FontFormat>, Constable

public enum FontFormat extends Enum<FontFormat>
Available font formats.
Author:
Christopher Mindus
  • Enum Constant Details

    • UNDEFINED

      public static final FontFormat UNDEFINED
      Undefined format.
    • WOFF2

      public static final FontFormat WOFF2
      The format: WOFF2.
    • WOFF

      public static final FontFormat WOFF
      The format: WOFF.
    • TrueType

      public static final FontFormat TrueType
      The format: TrueType.
    • OpenType

      public static final FontFormat OpenType
      The format: OpenType.
    • EmbeddedOpenType

      public static final FontFormat EmbeddedOpenType
      The format: Embedded Open Type (EOT).
    • SVG

      public static final FontFormat SVG
      The format: SVG.
  • Field Details

    • ext

      public final String ext
      File extension, null for undefined.
    • type

      public final String type
      The type name of the format in CSS, e.g. "truetype" or "embedded-opentype".
    • FORMATS

      public static final String[] FORMATS
      The format type names in an array.
  • Method Details

    • values

      public static FontFormat[] 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 FontFormat 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
    • fromFileExtension

      public static final FontFormat fromFileExtension(String fileName)
      Returns the format for the file extension.
      Parameters:
      fileName - The file name.
      Returns:
      A font format, perhaps UNDEFINED.
    • fromTypeName

      public static final FontFormat fromTypeName(String typeName)
      Returns the format for the format type name-
      Parameters:
      typeName - The type name.
      Returns:
      A font format, perhaps UNDEFINED.