Conversation
7635ba9 to
95586ff
Compare
|
Regarding multiple unicode versions, I do think support for them should be removed. Six years ago I wrote about the need for and implemented Although it is possible to introspect each terminal, as the ucs-detect tool does, to test against and curate "prediction tables" to absolutely match all terminals, supporting or not, eg. The python wcwidth library specifications very closely matches the kitty specification and is maintained with the help of community to match development of actively maintained terminal emulators. The nightly of ghostty matches this specification very closely and has a perfect score with ucs-detect tool, as pictured in the "After" screenshot, above without error. |
95586ff to
43d6954
Compare
|
This project appears abandoned, but I would really recommend to take a peek at the latest version of wcwidth should it ever return active Most recently I improved performance ~50x by use of C Python build extension, and, we now offer "terminal-specific" correction function, wcstwidth described in more detail here, https://www.jeffquast.com/post/perfecting-terminal-character-width-using-correction-tables/ -- I even use this issue's screenshots as a demonstration in the article |
Type of changes
AI?
Checklist
Description
Add
wcwidth>=0.5.3as a runtime dependency, and replace Rich's custom code generation and grapheme splitting / width logic measurement with wcwidth.width(), iter_graphemes(), and clip().Most importantly this fixes some eastern languages with complex combining rules (Virama, Hangul), "standalone" emojis skin tones, standalone "regional indicators", skin tones), but also eliminates ongoing maintenance of custom Unicode logic.
Before
Konsole:

Ghostty:

After
Konsole:

Ghostty:
