Enum Language

java.lang.Object
java.lang.Enum<Language>
org.apache.fontbox.ttf.model.Language
All Implemented Interfaces:
Serializable, Comparable<Language>

public enum Language extends Enum<Language>
Enumerates the languages supported for GSUB operation. In order to support a new language, you need to add it here and then implement the GsubWorker for the given language and return the same from the GsubWorkerFactory.getGsubWorker(org.apache.fontbox.ttf.CmapLookup, GsubData)
  • Enum Constant Details

    • BENGALI

      public static final Language BENGALI
    • DEVANAGARI

      public static final Language DEVANAGARI
    • GUJARATI

      public static final Language GUJARATI
    • LATIN

      public static final Language LATIN
    • DFLT

      public static final Language DFLT
    • UNSPECIFIED

      public static final Language UNSPECIFIED
      An entry explicitly denoting the absence of any concrete language. May be useful when no actual glyph substitution is required but only the content of GSUB table is of interest. Must be the last one as it is not a language per se.
  • Field Details

    • scriptNames

      private final String[] scriptNames
  • Constructor Details

    • Language

      private Language(String[] scriptNames)
  • Method Details

    • values

      public static Language[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Language valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getScriptNames

      public String[] getScriptNames()
      ScriptNames form the basis of identification of the language. This method gets the ScriptNames that the given Language supports, in the order of preference, Index 0 being the most preferred. These names should match the script record in the GSUB system.
      Returns:
      an array containing all supported languages