3.14 <PangoScript>

Enumeration: <PangoScript>

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>.

Members

invalid-code

a value never returned from 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

Procedures

Procedure: script:for-unichar ch ⇒ %return

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.

ch

Passed: a character.

a Unicode character

%return

Returned: a <PangoScript>.

the <PangoScript> for the character.

Procedure: script:get-sample-language script ⇒ %return

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.

script

Passed: a <PangoScript>, or one of its symbols.

a <PangoScript>

%return

Returned: a <PangoLanguage>, or #f.

a <PangoLanguage> that is representative of the script