threecode/unicodewidth

Search:
Group by:

Terminal cell width per rune, for cursor math and wrapping.

Combining marks (general categories Mn / Me) occupy no cell. East-Asian Wide / Fullwidth runes occupy two cells. Everything else (Ambiguous treated as narrow, Half, Narrow, Neutral) is one cell.

Procs

proc runeCellWidth(r: Rune): int {.inline, ...raises: [], tags: [], forbids: [].}