code / tomo-unicode

Lines41.6K Text41.0K Tomo583
3 others 91
Markdown81 make7 INI3
(144 lines)
1 # Some names for unicode abbreviations
3 CATEGORY_NAMES := {
4 "Cc": "Control",
5 "Cf": "Format",
6 "Co": "Private Use",
7 "Cs": "Surrrogate",
8 "Ll": "Lowercase Letter",
9 "Lm": "Modifier Letter",
10 "Lo": "Other Letter",
11 "Lt": "Titlecase Letter",
12 "Lu": "Uppercase Letter",
13 "Mc": "Spacing Mark",
14 "Me": "Enclosing Mark",
15 "Mn": "Nonspacing Mark",
16 "Nd": "Decimal Number",
17 "Nl": "Letter Number",
18 "No": "Other Number",
19 "Pc": "Connector Punctuation",
20 "Pd": "Dash Punctuation",
21 "Pe": "Close Punctuation",
22 "Pf": "Final Punctuation",
23 "Pi": "Initial Punctuation",
24 "Po": "Other Punctuation",
25 "Ps": "Open Punctuation",
26 "Sc": "Currency Symbol",
27 "Sk": "Modifier Symbol",
28 "Sm": "Math Symbol",
29 "So": "Other Symbol",
30 "Zl": "Line Separator",
31 "Zp": "Paragraph Separator",
32 "Zs": "Space Separator",
35 BIDI_NAMES := {
36 "AL": "Arabic Letter",
37 "AN": "Arabic Number",
38 "B": "Paragraph Separator",
39 "BN": "Boundary Neutral",
40 "CS": "Common Separator",
41 "EN": "European Number",
42 "ES": "European Separator",
43 "ET": "European Terminator",
44 "FSI": "First Strong Isolate",
45 "L": "Left To Right",
46 "LRE": "Left To Right Embedding",
47 "LRI": "Left To Right Isolate",
48 "LRO": "Left To Right Override",
49 "NSM": "Nonspacing Mark",
50 "ON": "Other Neutral",
51 "PDF": "Pop Directional Format",
52 "PDI": "Pop Directional Isolate",
53 "R": "Right To Left",
54 "RLE": "Right To Left Embedding",
55 "RLI": "Right To Left Isolate",
56 "RLO": "Right To Left Override",
57 "S": "Segment Separator",
58 "WS": "White Space",
61 COMBINING_NAMES := {
62 "0": "Not Reordered",
63 "1": "Overlay",
64 "6": "",
65 "7": "Nukta",
66 "8": "Kana Voicing",
67 "9": "Virama",
68 "10": "CCC10",
69 "11": "CCC11",
70 "12": "CCC12",
71 "13": "CCC13",
72 "14": "CCC14",
73 "15": "CCC15",
74 "16": "CCC16",
75 "17": "CCC17",
76 "18": "CCC18",
77 "19": "CCC19",
78 "20": "CCC20",
79 "21": "CCC21",
80 "22": "CCC22",
81 "23": "CCC23",
82 "24": "CCC24",
83 "25": "CCC25",
84 "26": "CCC26",
85 "27": "CCC27",
86 "28": "CCC28",
87 "29": "CCC29",
88 "30": "CCC30",
89 "31": "CCC31",
90 "32": "CCC32",
91 "33": "CCC33",
92 "34": "CCC34",
93 "35": "CCC35",
94 "36": "CCC36",
95 "84": "CCC84",
96 "91": "CCC91",
97 "103": "CCC103",
98 "107": "CCC107",
99 "118": "CCC118",
100 "122": "CCC122",
101 "129": "CCC129",
102 "130": "CCC130",
103 "132": "CCC132",
104 "202": "Attached Below",
105 "214": "Attached Above",
106 "216": "Attached Above Right",
107 "218": "Below Left",
108 "220": "Below",
109 "222": "Below Right",
110 "224": "Left",
111 "226": "Right",
112 "228": "Above Left",
113 "230": "Above",
114 "232": "Above Right",
115 "233": "Double Below",
116 "234": "Double Above",
117 "240": "Iota Subscript",
120 DECOMPOSITION_NAMES := {
121 "<circle>": "Encircled form",
122 "<compat>": "Otherwise unspecified compatibility character",
123 "<final>": "Final presentation form (Arabic)",
124 "<font>": "Font variant",
125 "<fraction>": "Vulgar fraction form",
126 "<initial>": "Initial presentation form (Arabic)",
127 "<isolated>": "Isolated presentation form (Arabic)",
128 "<medial>": "Medial presentation form (Arabic)",
129 "<narrow>": "Narrow (or hankaku) compatibility character",
130 "<noBreak>": "No-break version of a space or hyphen",
131 "<small>": "Small variant form (CNS compatibility)",
132 "<square>": "CJK squared font variant",
133 "<sub>": "Subscript form",
134 "<super>": "Superscript form",
135 "<vertical>": "Vertical layout presentation form",
136 "<wide>": "Wide (or zenkaku) compatibility character",
139 func named(thing:Text, names:{Text:Text} -> Text)
140 if name := names[thing]
141 return "$name ($thing)"
142 else
143 return thing