Package org.apache.fontbox.ttf.model
Enum Language
- All Implemented Interfaces:
Serializable,Comparable<Language>,java.lang.constant.Constable
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)-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn entry explicitly denoting the absence of any concrete language. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]ScriptNames form the basis of identification of the language.static LanguageReturns 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 Details
-
BENGALI
-
DEVANAGARI
-
GUJARATI
-
LATIN
-
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
-
-
Constructor Details
-
Language
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
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
-