Download
144 lines 3.7 KiBTomoModified 2025-11-23 raw
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
# Some names for unicode abbreviations

CATEGORY_NAMES := {
    "Cc": "Control",
    "Cf": "Format",
    "Co": "Private Use",
    "Cs": "Surrrogate",
    "Ll": "Lowercase Letter",
    "Lm": "Modifier Letter",
    "Lo": "Other Letter",
    "Lt": "Titlecase Letter",
    "Lu": "Uppercase Letter",
    "Mc": "Spacing Mark",
    "Me": "Enclosing Mark",
    "Mn": "Nonspacing Mark",
    "Nd": "Decimal Number",
    "Nl": "Letter Number",
    "No": "Other Number",
    "Pc": "Connector Punctuation",
    "Pd": "Dash Punctuation",
    "Pe": "Close Punctuation",
    "Pf": "Final Punctuation",
    "Pi": "Initial Punctuation",
    "Po": "Other Punctuation",
    "Ps": "Open Punctuation",
    "Sc": "Currency Symbol",
    "Sk": "Modifier Symbol",
    "Sm": "Math Symbol",
    "So": "Other Symbol",
    "Zl": "Line Separator",
    "Zp": "Paragraph Separator",
    "Zs": "Space Separator",
}

BIDI_NAMES := {
    "AL": "Arabic Letter",
    "AN": "Arabic Number",
    "B": "Paragraph Separator",
    "BN": "Boundary Neutral",
    "CS": "Common Separator",
    "EN": "European Number",
    "ES": "European Separator",
    "ET": "European Terminator",
    "FSI": "First Strong Isolate",
    "L": "Left To Right",
    "LRE": "Left To Right Embedding",
    "LRI": "Left To Right Isolate",
    "LRO": "Left To Right Override",
    "NSM": "Nonspacing Mark",
    "ON": "Other Neutral",
    "PDF": "Pop Directional Format",
    "PDI": "Pop Directional Isolate",
    "R": "Right To Left",
    "RLE": "Right To Left Embedding",
    "RLI": "Right To Left Isolate",
    "RLO": "Right To Left Override",
    "S": "Segment Separator",
    "WS": "White Space",
}

COMBINING_NAMES := {
    "0": "Not Reordered",
    "1": "Overlay",
    "6": "",
    "7": "Nukta",
    "8": "Kana Voicing",
    "9": "Virama",
    "10": "CCC10",
    "11": "CCC11",
    "12": "CCC12",
    "13": "CCC13",
    "14": "CCC14",
    "15": "CCC15",
    "16": "CCC16",
    "17": "CCC17",
    "18": "CCC18",
    "19": "CCC19",
    "20": "CCC20",
    "21": "CCC21",
    "22": "CCC22",
    "23": "CCC23",
    "24": "CCC24",
    "25": "CCC25",
    "26": "CCC26",
    "27": "CCC27",
    "28": "CCC28",
    "29": "CCC29",
    "30": "CCC30",
    "31": "CCC31",
    "32": "CCC32",
    "33": "CCC33",
    "34": "CCC34",
    "35": "CCC35",
    "36": "CCC36",
    "84": "CCC84",
    "91": "CCC91",
    "103": "CCC103",
    "107": "CCC107",
    "118": "CCC118",
    "122": "CCC122",
    "129": "CCC129",
    "130": "CCC130",
    "132": "CCC132",
    "202": "Attached Below",
    "214": "Attached Above",
    "216": "Attached Above Right",
    "218": "Below Left",
    "220": "Below",
    "222": "Below Right",
    "224": "Left",
    "226": "Right",
    "228": "Above Left",
    "230": "Above",
    "232": "Above Right",
    "233": "Double Below",
    "234": "Double Above",
    "240": "Iota Subscript",
}

DECOMPOSITION_NAMES := {
    "<circle>": "Encircled form",
    "<compat>": "Otherwise unspecified compatibility character",
    "<final>": "Final presentation form (Arabic)",
    "<font>": "Font variant",
    "<fraction>": "Vulgar fraction form",
    "<initial>": "Initial presentation form (Arabic)",
    "<isolated>": "Isolated presentation form (Arabic)",
    "<medial>": "Medial presentation form (Arabic)",
    "<narrow>": "Narrow (or hankaku) compatibility character",
    "<noBreak>": "No-break version of a space or hyphen",
    "<small>": "Small variant form (CNS compatibility)",
    "<square>": "CJK squared font variant",
    "<sub>": "Subscript form",
    "<super>": "Superscript form",
    "<vertical>": "Vertical layout presentation form",
    "<wide>": "Wide (or zenkaku) compatibility character",
}

func named(thing:Text, names:{Text:Text} -> Text)
    if name := names[thing]
        return "$name ($thing)"
    else
        return thing