~jaro/balkon

ref: 764fa6ebba367c344dae178816fc9566c203a17c balkon/src/Data/Text/ParagraphLayout/Internal/Script.hs -rw-r--r-- 4.3 KiB
764fa6ebJaro Internally support text breaks in ascending order. 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
module Data.Text.ParagraphLayout.Internal.Script (ScriptCode, charScript)
where

-- TODO: Use a direct interface to the ICU library, if possible.
-- The unicode-data-scripts package and the shortening code in this file use
-- hardcoded ranges, which may get out of sync with ICU.
import Unicode.Char.General.Scripts

type ScriptCode = String

-- | A short script code for the given character, as expected by HarfBuzz.
charScript :: Char -> ScriptCode
charScript = code . script

-- Hardcoded shortenings of script codes as of Unicode 15.0.0.
code :: Script -> ScriptCode
code Adlam = "Adlm"
code Ahom = "Ahom"
code AnatolianHieroglyphs = "Hluw"
code Arabic = "Arab"
code Armenian = "Armn"
code Avestan = "Avst"
code Balinese = "Bali"
code Bamum = "Bamu"
code BassaVah = "Bass"
code Batak = "Batk"
code Bengali = "Beng"
code Bhaiksuki = "Bhks"
code Bopomofo = "Bopo"
code Brahmi = "Brah"
code Braille = "Brai"
code Buginese = "Bugi"
code Buhid = "Buhd"
code CanadianAboriginal = "Cans"
code Carian = "Cari"
code CaucasianAlbanian = "Aghb"
code Chakma = "Cakm"
code Cham = "Cham"
code Cherokee = "Cher"
code Chorasmian = "Chrs"
code Common = "Zyyy"
code Coptic = "Copt"
code Cuneiform = "Xsux"
code Cypriot = "Cprt"
code CyproMinoan = "Cpmn"
code Cyrillic = "Cyrl"
code Deseret = "Dsrt"
code Devanagari = "Deva"
code DivesAkuru = "Diak"
code Dogra = "Dogr"
code Duployan = "Dupl"
code EgyptianHieroglyphs = "Egyp"
code Elbasan = "Elba"
code Elymaic = "Elym"
code Ethiopic = "Ethi"
code Georgian = "Geor"
code Glagolitic = "Glag"
code Gothic = "Goth"
code Grantha = "Gran"
code Greek = "Grek"
code Gujarati = "Gujr"
code GunjalaGondi = "Gong"
code Gurmukhi = "Guru"
code Han = "Hani"
code Hangul = "Hang"
code HanifiRohingya = "Rohg"
code Hanunoo = "Hano"
code Hatran = "Hatr"
code Hebrew = "Hebr"
code Hiragana = "Hira"
code ImperialAramaic = "Armi"
code Inherited = "Zinh"
code InscriptionalPahlavi = "Phli"
code InscriptionalParthian = "Prti"
code Javanese = "Java"
code Kaithi = "Kthi"
code Kannada = "Knda"
code Katakana = "Kana"
code Kawi = "Kawi"
code KayahLi = "Kali"
code Kharoshthi = "Khar"
code KhitanSmallScript = "Kits"
code Khmer = "Khmr"
code Khojki = "Khoj"
code Khudawadi = "Sind"
code Lao = "Laoo"
code Latin = "Latn"
code Lepcha = "Lepc"
code Limbu = "Limb"
code LinearA = "Lina"
code LinearB = "Linb"
code Lisu = "Lisu"
code Lycian = "Lyci"
code Lydian = "Lydi"
code Mahajani = "Mahj"
code Makasar = "Maka"
code Malayalam = "Mlym"
code Mandaic = "Mand"
code Manichaean = "Mani"
code Marchen = "Marc"
code MasaramGondi = "Gonm"
code Medefaidrin = "Medf"
code MeeteiMayek = "Mtei"
code MendeKikakui = "Mend"
code MeroiticCursive = "Merc"
code MeroiticHieroglyphs = "Mero"
code Miao = "Plrd"
code Modi = "Modi"
code Mongolian = "Mong"
code Mro = "Mroo"
code Multani = "Mult"
code Myanmar = "Mymr"
code Nabataean = "Nbat"
code NagMundari = "Nagm"
code Nandinagari = "Nand"
code NewTaiLue = "Talu"
code Newa = "Newa"
code Nko = "Nkoo"
code Nushu = "Nshu"
code NyiakengPuachueHmong = "Hmnp"
code Ogham = "Ogam"
code OlChiki = "Olck"
code OldHungarian = "Hung"
code OldItalic = "Ital"
code OldNorthArabian = "Narb"
code OldPermic = "Perm"
code OldPersian = "Xpeo"
code OldSogdian = "Sogo"
code OldSouthArabian = "Sarb"
code OldTurkic = "Orkh"
code OldUyghur = "Ougr"
code Oriya = "Orya"
code Osage = "Osge"
code Osmanya = "Osma"
code PahawhHmong = "Hmng"
code Palmyrene = "Palm"
code PauCinHau = "Pauc"
code PhagsPa = "Phag"
code Phoenician = "Phnx"
code PsalterPahlavi = "Phlp"
code Rejang = "Rjng"
code Runic = "Runr"
code Samaritan = "Samr"
code Saurashtra = "Saur"
code Sharada = "Shrd"
code Shavian = "Shaw"
code Siddham = "Sidd"
code SignWriting = "Sgnw"
code Sinhala = "Sinh"
code Sogdian = "Sogd"
code SoraSompeng = "Sora"
code Soyombo = "Soyo"
code Sundanese = "Sund"
code SylotiNagri = "Sylo"
code Syriac = "Syrc"
code Tagalog = "Tglg"
code Tagbanwa = "Tagb"
code TaiLe = "Tale"
code TaiTham = "Lana"
code TaiViet = "Tavt"
code Takri = "Takr"
code Tamil = "Taml"
code Tangsa = "Tnsa"
code Tangut = "Tang"
code Telugu = "Telu"
code Thaana = "Thaa"
code Thai = "Thai"
code Tibetan = "Tibt"
code Tifinagh = "Tfng"
code Tirhuta = "Tirh"
code Toto = "Toto"
code Ugaritic = "Ugar"
code Unknown = "Zzzz"
code Vai = "Vaii"
code Vithkuqi = "Vith"
code Wancho = "Wcho"
code WarangCiti = "Wara"
code Yezidi = "Yezi"
code Yi = "Yiii"
code ZanabazarSquare = "Zanb"