module
CryTUI::TextWidth
Overview
Terminal display-width helpers. Crystal supplies Unicode 17 grapheme segmentation; CryTUI classifies each grapheme as zero, one, or two cells. Ambiguous-width characters intentionally default to one cell, matching Ratatui and most UTF-8 terminal configurations.
Extended Modules
Defined in:
crytui/text_width.crConstant Summary
-
WIDE_RANGES =
[4352..4447, 6052..6052, 8986..8987, 9001..9002, 9193..9196, 9200..9200, 9203..9203, 9725..9726, 9748..9749, 9800..9811, 9855..9855, 9875..9875, 9889..9889, 9898..9899, 9917..9918, 9924..9925, 9934..9934, 9940..9940, 9962..9962, 9970..9971, 9973..9973, 9978..9978, 9981..9981, 9989..9989, 9994..9995, 10024..10024, 10060..10060, 10062..10062, 10067..10069, 10071..10071, 10133..10135, 10160..10160, 10175..10175, 11035..11036, 11088..11088, 11093..11093, 11904..11929, 11931..12019, 12032..12245, 12272..12329, 12336..12350, 12353..12438, 12443..12543, 12549..12591, 12593..12643, 12645..12686, 12688..12771, 12783..12830, 12832..12871, 12880..19903, 19968..42124, 42128..42182, 43360..43388, 44032..55203, 63744..64255, 65040..65049, 65072..65106, 65108..65126, 65128..65131, 65281..65376, 65504..65510, 94176..94179, 94192..94193, 94208..100343, 100352..101589, 101632..101640, 110576..110579, 110581..110587, 110589..110590, 110592..110882, 110898..110898, 110928..110930, 110933..110933, 110948..110951, 110960..111355, 126980..126980, 127183..127183, 127374..127374, 127377..127386, 127488..127490, 127504..127547, 127552..127560, 127568..127569, 127584..127589, 127744..127776, 127789..127797, 127799..127868, 127870..127891, 127904..127946, 127951..127955, 127968..127984, 127988..127988, 127992..128062, 128064..128064, 128066..128252, 128255..128317, 128331..128334, 128336..128359, 128378..128378, 128405..128406, 128420..128420, 128507..128591, 128640..128709, 128716..128716, 128720..128722, 128725..128727, 128732..128735, 128747..128748, 128756..128764, 128992..129003, 129008..129008, 129292..129338, 129340..129349, 129351..129535, 129648..129660, 129664..129672, 129680..129725, 129727..129733, 129742..129755, 129760..129768, 129776..129784, 131072..196605, 196608..262141] -
Unicode 15.1 W/F and default emoji-presentation ranges used by unicode-width 0.2, Ratatui 0.29's width implementation. Ambiguous-width symbols remain narrow. This matters for TUI glyphs such as ▶, 🎚 and ⚠.