Package org.apache.fontbox.ttf.model
Enum Language
- java.lang.Object
-
- java.lang.Enum<Language>
-
- org.apache.fontbox.ttf.model.Language
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Language>
public enum Language extends java.lang.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 theGsubWorkerfor the given language and return the same from theGsubWorkerFactory.getGsubWorker(org.apache.fontbox.ttf.CmapLookup, GsubData)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BENGALIDEVANAGARIGUJARATILATINUNSPECIFIEDAn entry explicitly denoting the absence of any concrete language.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]scriptNames
-
Constructor Summary
Constructors Modifier Constructor Description privateLanguage(java.lang.String[] scriptNames)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getScriptNames()ScriptNames form the basis of identification of the language.static LanguagevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Language[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BENGALI
public static final Language BENGALI
-
DEVANAGARI
public static final Language DEVANAGARI
-
GUJARATI
public static final Language GUJARATI
-
LATIN
public static final Language LATIN
-
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.
-
-
Method Detail
-
values
public static Language[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Language c : Language.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Language valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getScriptNames
public java.lang.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
-
-