Enum Class Script
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<Script>
,Constable
PangoScript
enumeration identifies different writing
systems.
The values correspond to the names as defined in the Unicode standard. See Unicode Standard Annex 24: Script names
Note that this enumeration is deprecated and will not be updated to include values
in newer versions of the Unicode standard. Applications should use the
GLib.UnicodeScript
enumeration instead,
whose values are interchangeable with PangoScript
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAhom.Anatolian Hieroglyphs.ArabicArmenianBalinese.Bassa.Batak.BengaliBopomofoBrahmi.BrailleBuginese.BuhidCanadian AboriginalCarian.Caucasian Albanian.Chakma.Cham.Cherokeea character used by multiple different scriptsCopticCuneiform.CypriotCyrillicDeseretDevanagariDuployan.Elbasan.EthiopicGeorgianGlagolitic.GothicGrantha.GreekGujaratiGurmukhiHanHangulHanunooHatran.HebrewHiraganaa mark glyph that takes its script from the base glyph to which it is attacheda value never returned from pango_script_for_unichar()KannadaKatakanaKayah Li.Kharoshthi.KhmerKjohki.Khudawadi, Sindhi.LaoLatinLepcha.LimbuLinear A.Linear BLycian.Lydian.Mahajani.MalayalamMandaic.Manichaean.Mende Kikakui.Meroitic Cursive.Meroitic Hieroglyphs.Miao.Modi.MongolianMro.Multani.MyanmarNabataean.New Tai Lue.N'Ko.OghamOl Chiki.Old Hungarian.Old ItalicOld North Arabian.Old Permic.Old Persian.OriyaOsmanyaPahawh Hmong.Palmyrene.Pau Cin Hau.Phags-pa.Phoenician.Psalter Pahlavi.Rejang.RunicSaurashtra.Sharada.ShavianSiddham.Signwriting.SinhalaSora Sompeng.Sundanese.Syloti Nagri.SyriacTagalogTagbanwaTai LeTakri.TamilTeluguThaanaThaiTibetanTifinagh.Tirhuta.Ugaritican unassigned code point.Vai.Warang Citi.Yi -
Method Summary
Modifier and TypeMethodDescriptionstatic Script
forUnichar
(int ch) Deprecated.Use g_unichar_get_script()Finds a language tag that is reasonably representative of this Script.static Type
getType()
Get the GType of the Script classint
getValue()
Get the numeric value of this enumstatic Script
of
(int value) Create a new Script for the provided valuestatic Script
Returns the enum constant of this class with the specified name.static Script[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INVALID_CODE
a value never returned from pango_script_for_unichar() -
COMMON
a character used by multiple different scripts -
INHERITED
a mark glyph that takes its script from the base glyph to which it is attached -
ARABIC
Arabic -
ARMENIAN
Armenian -
BENGALI
Bengali -
BOPOMOFO
Bopomofo -
CHEROKEE
Cherokee -
COPTIC
Coptic -
CYRILLIC
Cyrillic -
DESERET
Deseret -
DEVANAGARI
Devanagari -
ETHIOPIC
Ethiopic -
GEORGIAN
Georgian -
GOTHIC
Gothic -
GREEK
Greek -
GUJARATI
Gujarati -
GURMUKHI
Gurmukhi -
HAN
Han -
HANGUL
Hangul -
HEBREW
Hebrew -
HIRAGANA
Hiragana -
KANNADA
Kannada -
KATAKANA
Katakana -
KHMER
Khmer -
LAO
Lao -
LATIN
Latin -
MALAYALAM
Malayalam -
MONGOLIAN
Mongolian -
MYANMAR
Myanmar -
OGHAM
Ogham -
OLD_ITALIC
Old Italic -
ORIYA
Oriya -
RUNIC
Runic -
SINHALA
Sinhala -
SYRIAC
Syriac -
TAMIL
Tamil -
TELUGU
Telugu -
THAANA
Thaana -
THAI
Thai -
TIBETAN
Tibetan -
CANADIAN_ABORIGINAL
Canadian Aboriginal -
YI
Yi -
TAGALOG
Tagalog -
HANUNOO
Hanunoo -
BUHID
Buhid -
TAGBANWA
Tagbanwa -
BRAILLE
Braille -
CYPRIOT
Cypriot -
LIMBU
Limbu -
OSMANYA
Osmanya -
SHAVIAN
Shavian -
LINEAR_B
Linear B -
TAI_LE
Tai Le -
UGARITIC
Ugaritic -
NEW_TAI_LUE
New Tai Lue. Since 1.10 -
BUGINESE
Buginese. Since 1.10 -
GLAGOLITIC
Glagolitic. Since 1.10 -
TIFINAGH
Tifinagh. Since 1.10 -
SYLOTI_NAGRI
Syloti Nagri. Since 1.10 -
OLD_PERSIAN
Old Persian. Since 1.10 -
KHAROSHTHI
Kharoshthi. Since 1.10 -
UNKNOWN
an unassigned code point. Since 1.14 -
BALINESE
Balinese. Since 1.14 -
CUNEIFORM
Cuneiform. Since 1.14 -
PHOENICIAN
Phoenician. Since 1.14 -
PHAGS_PA
Phags-pa. Since 1.14 -
NKO
N'Ko. Since 1.14 -
KAYAH_LI
Kayah Li. Since 1.20.1 -
LEPCHA
Lepcha. Since 1.20.1 -
REJANG
Rejang. Since 1.20.1 -
SUNDANESE
Sundanese. Since 1.20.1 -
SAURASHTRA
Saurashtra. Since 1.20.1 -
CHAM
Cham. Since 1.20.1 -
OL_CHIKI
Ol Chiki. Since 1.20.1 -
VAI
Vai. Since 1.20.1 -
CARIAN
Carian. Since 1.20.1 -
LYCIAN
Lycian. Since 1.20.1 -
LYDIAN
Lydian. Since 1.20.1 -
BATAK
Batak. Since 1.32 -
BRAHMI
Brahmi. Since 1.32 -
MANDAIC
Mandaic. Since 1.32 -
CHAKMA
Chakma. Since: 1.32 -
MEROITIC_CURSIVE
Meroitic Cursive. Since: 1.32 -
MEROITIC_HIEROGLYPHS
Meroitic Hieroglyphs. Since: 1.32 -
MIAO
Miao. Since: 1.32 -
SHARADA
Sharada. Since: 1.32 -
SORA_SOMPENG
Sora Sompeng. Since: 1.32 -
TAKRI
Takri. Since: 1.32 -
BASSA_VAH
Bassa. Since: 1.40 -
CAUCASIAN_ALBANIAN
Caucasian Albanian. Since: 1.40 -
DUPLOYAN
Duployan. Since: 1.40 -
ELBASAN
Elbasan. Since: 1.40 -
GRANTHA
Grantha. Since: 1.40 -
KHOJKI
Kjohki. Since: 1.40 -
KHUDAWADI
Khudawadi, Sindhi. Since: 1.40 -
LINEAR_A
Linear A. Since: 1.40 -
MAHAJANI
Mahajani. Since: 1.40 -
MANICHAEAN
Manichaean. Since: 1.40 -
MENDE_KIKAKUI
Mende Kikakui. Since: 1.40 -
MODI
Modi. Since: 1.40 -
MRO
Mro. Since: 1.40 -
NABATAEAN
Nabataean. Since: 1.40 -
OLD_NORTH_ARABIAN
Old North Arabian. Since: 1.40 -
OLD_PERMIC
Old Permic. Since: 1.40 -
PAHAWH_HMONG
Pahawh Hmong. Since: 1.40 -
PALMYRENE
Palmyrene. Since: 1.40 -
PAU_CIN_HAU
Pau Cin Hau. Since: 1.40 -
PSALTER_PAHLAVI
Psalter Pahlavi. Since: 1.40 -
SIDDHAM
Siddham. Since: 1.40 -
TIRHUTA
Tirhuta. Since: 1.40 -
WARANG_CITI
Warang Citi. Since: 1.40 -
AHOM
Ahom. Since: 1.40 -
ANATOLIAN_HIEROGLYPHS
Anatolian Hieroglyphs. Since: 1.40 -
HATRAN
Hatran. Since: 1.40 -
MULTANI
Multani. Since: 1.40 -
OLD_HUNGARIAN
Old Hungarian. Since: 1.40 -
SIGNWRITING
Signwriting. Since: 1.40
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
of
Create a new Script for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-
forUnichar
Deprecated.Use g_unichar_get_script()Looks up the script for a particular character.The script of a character is defined by Unicode Standard Annex 24: Script names.
No check is made for
ch
being a valid Unicode character; if you pass in invalid character, the result is undefined.Note that while the return type of this function is declared as
PangoScript
, as of Pango 1.18, this function simply returns the return value ofGLib.unicharGetScript(int)
. Callers must be prepared to handle unknown values.- Parameters:
ch
- a Unicode character- Returns:
- the
PangoScript
for the character.
-
getSampleLanguage
Finds a language tag that is reasonably representative of this Script.The language will usually be the most widely spoken or used language written in that script: for instance, the sample language for
CYRILLIC
is ru (Russian), the sample language forARABIC
is ar.For some scripts, no sample language will be returned because there is no language that is sufficiently representative. The best example of this is
HAN
, where various different variants of written Chinese, Japanese, and Korean all use significantly different sets of Han characters and forms of shared characters. No sample language can be provided for many historical scripts as well.As of 1.18, this function checks the environment variables
PANGO_LANGUAGE
andLANGUAGE
(checked in that order) first. If one of them is set, it is parsed as a list of language tags separated by colons or other separators. This function will return the first language in the parsed list that Pango believes may use this Script for writing. This last predicate is tested usingLanguage.includesScript(org.gnome.pango.Script)
. This can be used to control Pango's font selection for non-primary languages. For example, aPANGO_LANGUAGE
enviroment variable set to "en:fa" makes Pango choose fonts suitable for Persian (fa) instead of Arabic (ar) when a segment of Arabic text is found in an otherwise non-Arabic text. The same trick can be used to choose a default language forHAN
when setting context language is not feasible.- Returns:
- a
PangoLanguage
that is representative of the script
-