Module fpdf.unicode_script

The hardcoded information on this module was loaded from the Unicode file Scripts-15.1.0.txt https://www.unicode.org/Public/UNIDATA/Scripts.txt Python's standard "unicodedata" library doesn't offer this table.

Functions

def get_unicode_script(char: str) ‑> UnicodeScript
Expand source code Browse git
@lru_cache(maxsize=None)
def get_unicode_script(char: str) -> UnicodeScript:
    chr_search = ord(char)
    for range_start, range_end, script_code in UNICODE_RANGE_TO_SCRIPT:
        if range_start <= chr_search <= range_end:
            return UnicodeScript(script_code)
        if chr_search < range_start:
            break
    return UnicodeScript(999)  # default to Unknown

Classes

class UnicodeScript (*args, **kwds)
Expand source code Browse git
class UnicodeScript(IntEnum):
    COMMON = 0
    LATIN = 1
    GREEK = 2
    CYRILLIC = 3
    ARMENIAN = 4
    HEBREW = 5
    ARABIC = 6
    SYRIAC = 7
    THAANA = 8
    DEVANAGARI = 9
    BENGALI = 10
    GURMUKHI = 11
    GUJARATI = 12
    ORIYA = 13
    TAMIL = 14
    TELUGU = 15
    KANNADA = 16
    MALAYALAM = 17
    SINHALA = 18
    THAI = 19
    LAO = 20
    TIBETAN = 21
    MYANMAR = 22
    GEORGIAN = 23
    HANGUL = 24
    ETHIOPIC = 25
    CHEROKEE = 26
    CANADIAN_ABORIGINAL = 27
    OGHAM = 28
    RUNIC = 29
    KHMER = 30
    MONGOLIAN = 31
    HIRAGANA = 32
    KATAKANA = 33
    BOPOMOFO = 34
    HAN = 35
    YI = 36
    OLD_ITALIC = 37
    GOTHIC = 38
    DESERET = 39
    INHERITED = 40
    TAGALOG = 41
    HANUNOO = 42
    BUHID = 43
    TAGBANWA = 44
    LIMBU = 45
    TAI_LE = 46
    LINEAR_B = 47
    UGARITIC = 48
    SHAVIAN = 49
    OSMANYA = 50
    CYPRIOT = 51
    BRAILLE = 52
    BUGINESE = 53
    COPTIC = 54
    NEW_TAI_LUE = 55
    GLAGOLITIC = 56
    TIFINAGH = 57
    SYLOTI_NAGRI = 58
    OLD_PERSIAN = 59
    KHAROSHTHI = 60
    BALINESE = 61
    CUNEIFORM = 62
    PHOENICIAN = 63
    PHAGS_PA = 64
    NKO = 65
    SUNDANESE = 66
    LEPCHA = 67
    OL_CHIKI = 68
    VAI = 69
    SAURASHTRA = 70
    KAYAH_LI = 71
    REJANG = 72
    LYCIAN = 73
    CARIAN = 74
    LYDIAN = 75
    CHAM = 76
    TAI_THAM = 77
    TAI_VIET = 78
    AVESTAN = 79
    EGYPTIAN_HIEROGLYPHS = 80
    SAMARITAN = 81
    LISU = 82
    BAMUM = 83
    JAVANESE = 84
    MEETEI_MAYEK = 85
    IMPERIAL_ARAMAIC = 86
    OLD_SOUTH_ARABIAN = 87
    INSCRIPTIONAL_PARTHIAN = 88
    INSCRIPTIONAL_PAHLAVI = 89
    OLD_TURKIC = 90
    KAITHI = 91
    BATAK = 92
    BRAHMI = 93
    MANDAIC = 94
    CHAKMA = 95
    MEROITIC_CURSIVE = 96
    MEROITIC_HIEROGLYPHS = 97
    MIAO = 98
    SHARADA = 99
    SORA_SOMPENG = 100
    TAKRI = 101
    CAUCASIAN_ALBANIAN = 102
    BASSA_VAH = 103
    DUPLOYAN = 104
    ELBASAN = 105
    GRANTHA = 106
    PAHAWH_HMONG = 107
    KHOJKI = 108
    LINEAR_A = 109
    MAHAJANI = 110
    MANICHAEAN = 111
    MENDE_KIKAKUI = 112
    MODI = 113
    MRO = 114
    OLD_NORTH_ARABIAN = 115
    NABATAEAN = 116
    PALMYRENE = 117
    PAU_CIN_HAU = 118
    OLD_PERMIC = 119
    PSALTER_PAHLAVI = 120
    SIDDHAM = 121
    KHUDAWADI = 122
    TIRHUTA = 123
    WARANG_CITI = 124
    AHOM = 125
    ANATOLIAN_HIEROGLYPHS = 126
    HATRAN = 127
    MULTANI = 128
    OLD_HUNGARIAN = 129
    SIGNWRITING = 130
    ADLAM = 131
    BHAIKSUKI = 132
    MARCHEN = 133
    NEWA = 134
    OSAGE = 135
    TANGUT = 136
    MASARAM_GONDI = 137
    NUSHU = 138
    SOYOMBO = 139
    ZANABAZAR_SQUARE = 140
    DOGRA = 141
    GUNJALA_GONDI = 142
    MAKASAR = 143
    MEDEFAIDRIN = 144
    HANIFI_ROHINGYA = 145
    SOGDIAN = 146
    OLD_SOGDIAN = 147
    ELYMAIC = 148
    NANDINAGARI = 149
    NYIAKENG_PUACHUE_HMONG = 150
    WANCHO = 151
    CHORASMIAN = 152
    DIVES_AKURU = 153
    KHITAN_SMALL_SCRIPT = 154
    YEZIDI = 155
    CYPRO_MINOAN = 156
    OLD_UYGHUR = 157
    TANGSA = 158
    TOTO = 159
    VITHKUQI = 160
    KAWI = 161
    NAG_MUNDARI = 162
    UNKNOWN = 999

Enum where members are also (and must be) ints

Ancestors

  • enum.IntEnum
  • builtins.int
  • enum.ReprEnum
  • enum.Enum

Class variables

var ADLAM

The type of the None singleton.

var AHOM

The type of the None singleton.

var ANATOLIAN_HIEROGLYPHS

The type of the None singleton.

var ARABIC

The type of the None singleton.

var ARMENIAN

The type of the None singleton.

var AVESTAN

The type of the None singleton.

var BALINESE

The type of the None singleton.

var BAMUM

The type of the None singleton.

var BASSA_VAH

The type of the None singleton.

var BATAK

The type of the None singleton.

var BENGALI

The type of the None singleton.

var BHAIKSUKI

The type of the None singleton.

var BOPOMOFO

The type of the None singleton.

var BRAHMI

The type of the None singleton.

var BRAILLE

The type of the None singleton.

var BUGINESE

The type of the None singleton.

var BUHID

The type of the None singleton.

var CANADIAN_ABORIGINAL

The type of the None singleton.

var CARIAN

The type of the None singleton.

var CAUCASIAN_ALBANIAN

The type of the None singleton.

var CHAKMA

The type of the None singleton.

var CHAM

The type of the None singleton.

var CHEROKEE

The type of the None singleton.

var CHORASMIAN

The type of the None singleton.

var COMMON

The type of the None singleton.

var COPTIC

The type of the None singleton.

var CUNEIFORM

The type of the None singleton.

var CYPRIOT

The type of the None singleton.

var CYPRO_MINOAN

The type of the None singleton.

var CYRILLIC

The type of the None singleton.

var DESERET

The type of the None singleton.

var DEVANAGARI

The type of the None singleton.

var DIVES_AKURU

The type of the None singleton.

var DOGRA

The type of the None singleton.

var DUPLOYAN

The type of the None singleton.

var EGYPTIAN_HIEROGLYPHS

The type of the None singleton.

var ELBASAN

The type of the None singleton.

var ELYMAIC

The type of the None singleton.

var ETHIOPIC

The type of the None singleton.

var GEORGIAN

The type of the None singleton.

var GLAGOLITIC

The type of the None singleton.

var GOTHIC

The type of the None singleton.

var GRANTHA

The type of the None singleton.

var GREEK

The type of the None singleton.

var GUJARATI

The type of the None singleton.

var GUNJALA_GONDI

The type of the None singleton.

var GURMUKHI

The type of the None singleton.

var HAN

The type of the None singleton.

var HANGUL

The type of the None singleton.

var HANIFI_ROHINGYA

The type of the None singleton.

var HANUNOO

The type of the None singleton.

var HATRAN

The type of the None singleton.

var HEBREW

The type of the None singleton.

var HIRAGANA

The type of the None singleton.

var IMPERIAL_ARAMAIC

The type of the None singleton.

var INHERITED

The type of the None singleton.

var INSCRIPTIONAL_PAHLAVI

The type of the None singleton.

var INSCRIPTIONAL_PARTHIAN

The type of the None singleton.

var JAVANESE

The type of the None singleton.

var KAITHI

The type of the None singleton.

var KANNADA

The type of the None singleton.

var KATAKANA

The type of the None singleton.

var KAWI

The type of the None singleton.

var KAYAH_LI

The type of the None singleton.

var KHAROSHTHI

The type of the None singleton.

var KHITAN_SMALL_SCRIPT

The type of the None singleton.

var KHMER

The type of the None singleton.

var KHOJKI

The type of the None singleton.

var KHUDAWADI

The type of the None singleton.

var LAO

The type of the None singleton.

var LATIN

The type of the None singleton.

var LEPCHA

The type of the None singleton.

var LIMBU

The type of the None singleton.

var LINEAR_A

The type of the None singleton.

var LINEAR_B

The type of the None singleton.

var LISU

The type of the None singleton.

var LYCIAN

The type of the None singleton.

var LYDIAN

The type of the None singleton.

var MAHAJANI

The type of the None singleton.

var MAKASAR

The type of the None singleton.

var MALAYALAM

The type of the None singleton.

var MANDAIC

The type of the None singleton.

var MANICHAEAN

The type of the None singleton.

var MARCHEN

The type of the None singleton.

var MASARAM_GONDI

The type of the None singleton.

var MEDEFAIDRIN

The type of the None singleton.

var MEETEI_MAYEK

The type of the None singleton.

var MENDE_KIKAKUI

The type of the None singleton.

var MEROITIC_CURSIVE

The type of the None singleton.

var MEROITIC_HIEROGLYPHS

The type of the None singleton.

var MIAO

The type of the None singleton.

var MODI

The type of the None singleton.

var MONGOLIAN

The type of the None singleton.

var MRO

The type of the None singleton.

var MULTANI

The type of the None singleton.

var MYANMAR

The type of the None singleton.

var NABATAEAN

The type of the None singleton.

var NAG_MUNDARI

The type of the None singleton.

var NANDINAGARI

The type of the None singleton.

var NEWA

The type of the None singleton.

var NEW_TAI_LUE

The type of the None singleton.

var NKO

The type of the None singleton.

var NUSHU

The type of the None singleton.

var NYIAKENG_PUACHUE_HMONG

The type of the None singleton.

var OGHAM

The type of the None singleton.

var OLD_HUNGARIAN

The type of the None singleton.

var OLD_ITALIC

The type of the None singleton.

var OLD_NORTH_ARABIAN

The type of the None singleton.

var OLD_PERMIC

The type of the None singleton.

var OLD_PERSIAN

The type of the None singleton.

var OLD_SOGDIAN

The type of the None singleton.

var OLD_SOUTH_ARABIAN

The type of the None singleton.

var OLD_TURKIC

The type of the None singleton.

var OLD_UYGHUR

The type of the None singleton.

var OL_CHIKI

The type of the None singleton.

var ORIYA

The type of the None singleton.

var OSAGE

The type of the None singleton.

var OSMANYA

The type of the None singleton.

var PAHAWH_HMONG

The type of the None singleton.

var PALMYRENE

The type of the None singleton.

var PAU_CIN_HAU

The type of the None singleton.

var PHAGS_PA

The type of the None singleton.

var PHOENICIAN

The type of the None singleton.

var PSALTER_PAHLAVI

The type of the None singleton.

var REJANG

The type of the None singleton.

var RUNIC

The type of the None singleton.

var SAMARITAN

The type of the None singleton.

var SAURASHTRA

The type of the None singleton.

var SHARADA

The type of the None singleton.

var SHAVIAN

The type of the None singleton.

var SIDDHAM

The type of the None singleton.

var SIGNWRITING

The type of the None singleton.

var SINHALA

The type of the None singleton.

var SOGDIAN

The type of the None singleton.

var SORA_SOMPENG

The type of the None singleton.

var SOYOMBO

The type of the None singleton.

var SUNDANESE

The type of the None singleton.

var SYLOTI_NAGRI

The type of the None singleton.

var SYRIAC

The type of the None singleton.

var TAGALOG

The type of the None singleton.

var TAGBANWA

The type of the None singleton.

var TAI_LE

The type of the None singleton.

var TAI_THAM

The type of the None singleton.

var TAI_VIET

The type of the None singleton.

var TAKRI

The type of the None singleton.

var TAMIL

The type of the None singleton.

var TANGSA

The type of the None singleton.

var TANGUT

The type of the None singleton.

var TELUGU

The type of the None singleton.

var THAANA

The type of the None singleton.

var THAI

The type of the None singleton.

var TIBETAN

The type of the None singleton.

var TIFINAGH

The type of the None singleton.

var TIRHUTA

The type of the None singleton.

var TOTO

The type of the None singleton.

var UGARITIC

The type of the None singleton.

var UNKNOWN

The type of the None singleton.

var VAI

The type of the None singleton.

var VITHKUQI

The type of the None singleton.

var WANCHO

The type of the None singleton.

var WARANG_CITI

The type of the None singleton.

var YEZIDI

The type of the None singleton.

var YI

The type of the None singleton.

var ZANABAZAR_SQUARE

The type of the None singleton.