Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

CursesDriver doesn't render wide codepoints correctly

Open tig opened this issue 2 years ago • 2 comments

Curses is doing something funky with glyphs that report GetColums() of 1 yet are rendered wide. E.g. 0x2064 (invisible times) is reported as 1 column but is rendered as 2. WindowsDriver & NetDriver correctly render this as 1 column, overlapping the next cell.

I've spent many hours trying to figure this out. I'm at a loss.

JT9gIoo 1

I'm pretty sure curses is actively trying to determine a codepoint is wide and ignoring wcwidth (which it does use, and I've verified is that latest).

I suspect the way to address this is to stop using Curses.addstr etc... and instead emit ANSI sequences directly to the output stream.

tig avatar Aug 09 '23 20:08 tig

Relevant. Esp 2070.

https://github.com/mintty/mintty/blob/master/wiki/CtrlSeqs.md

tig avatar Jul 24 '24 11:07 tig

Another good set of characters to be sure to test things with is the wide decimal digits. They count as numbers but are multibyte and supposed to render as 2 columns.

dodexahedron avatar Jul 25 '24 03:07 dodexahedron