The <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 <GUnicodeScript>
enumeration instead, whose values are interchangeable with
<PangoScript>.
invalid-codea value never returned from script:for-unichar
commona character used by multiple different scripts
inheriteda mark glyph that takes its script from the base glyph to which it is attached
arabicArabic
armenianArmenian
bengaliBengali
bopomofoBopomofo
cherokeeCherokee
copticCoptic
cyrillicCyrillic
deseretDeseret
devanagariDevanagari
ethiopicEthiopic
georgianGeorgian
gothicGothic
greekGreek
gujaratiGujarati
gurmukhiGurmukhi
hanHan
hangulHangul
hebrewHebrew
hiraganaHiragana
kannadaKannada
katakanaKatakana
khmerKhmer
laoLao
latinLatin
malayalamMalayalam
mongolianMongolian
myanmarMyanmar
oghamOgham
old-italicOld Italic
oriyaOriya
runicRunic
sinhalaSinhala
syriacSyriac
tamilTamil
teluguTelugu
thaanaThaana
thaiThai
tibetanTibetan
canadian-aboriginalCanadian Aboriginal
yiYi
tagalogTagalog
hanunooHanunoo
buhidBuhid
tagbanwaTagbanwa
brailleBraille
cypriotCypriot
limbuLimbu
osmanyaOsmanya
shavianShavian
linear-bLinear B
tai-leTai Le
ugariticUgaritic
new-tai-lueNew Tai Lue. Since 1.10
bugineseBuginese. Since 1.10
glagoliticGlagolitic. Since 1.10
tifinaghTifinagh. Since 1.10
syloti-nagriSyloti Nagri. Since 1.10
old-persianOld Persian. Since 1.10
kharoshthiKharoshthi. Since 1.10
unknownan unassigned code point. Since 1.14
balineseBalinese. Since 1.14
cuneiformCuneiform. Since 1.14
phoenicianPhoenician. Since 1.14
phags-paPhags-pa. Since 1.14
nkoN’Ko. Since 1.14
kayah-liKayah Li. Since 1.20.1
lepchaLepcha. Since 1.20.1
rejangRejang. Since 1.20.1
sundaneseSundanese. Since 1.20.1
saurashtraSaurashtra. Since 1.20.1
chamCham. Since 1.20.1
ol-chikiOl Chiki. Since 1.20.1
vaiVai. Since 1.20.1
carianCarian. Since 1.20.1
lycianLycian. Since 1.20.1
lydianLydian. Since 1.20.1
batakBatak. Since 1.32
brahmiBrahmi. Since 1.32
mandaicMandaic. Since 1.32
chakmaChakma. Since: 1.32
meroitic-cursiveMeroitic Cursive. Since: 1.32
meroitic-hieroglyphsMeroitic Hieroglyphs. Since: 1.32
miaoMiao. Since: 1.32
sharadaSharada. Since: 1.32
sora-sompengSora Sompeng. Since: 1.32
takriTakri. Since: 1.32
bassa-vahBassa. Since: 1.40
caucasian-albanianCaucasian Albanian. Since: 1.40
duployanDuployan. Since: 1.40
elbasanElbasan. Since: 1.40
granthaGrantha. Since: 1.40
khojkiKjohki. Since: 1.40
khudawadiKhudawadi, Sindhi. Since: 1.40
linear-aLinear A. Since: 1.40
mahajaniMahajani. Since: 1.40
manichaeanManichaean. Since: 1.40
mende-kikakuiMende Kikakui. Since: 1.40
modiModi. Since: 1.40
mroMro. Since: 1.40
nabataeanNabataean. Since: 1.40
old-north-arabianOld North Arabian. Since: 1.40
old-permicOld Permic. Since: 1.40
pahawh-hmongPahawh Hmong. Since: 1.40
palmyrenePalmyrene. Since: 1.40
pau-cin-hauPau Cin Hau. Since: 1.40
psalter-pahlaviPsalter Pahlavi. Since: 1.40
siddhamSiddham. Since: 1.40
tirhutaTirhuta. Since: 1.40
warang-citiWarang Citi. Since: 1.40
ahomAhom. Since: 1.40
anatolian-hieroglyphsAnatolian Hieroglyphs. Since: 1.40
hatranHatran. Since: 1.40
multaniMultani. Since: 1.40
old-hungarianOld Hungarian. Since: 1.40
signwritingSignwriting. Since: 1.40
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 of
unichar-get-script. Callers must
be prepared to handle unknown values.
Passed: a character.
a Unicode character
Returned: a <PangoScript>.
the <PangoScript> for the character.
Finds a language tag that is reasonably representative of 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 for
arabic 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 and LANGUAGE (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 script for
writing. This last predicate is tested using language:includes-script?. This can be used to
control Pango’s font selection for non-primary languages. For example,
a PANGO_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 for
han when setting context language is not feasible.
Passed: a <PangoScript>, or one of its symbols.
Returned: a <PangoLanguage>, or #f.
a <PangoLanguage> that is representative of the
script