jroimartin / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
9.92k stars 608 forks source link

ASCII border #91

Closed mattn closed 7 years ago

mattn commented 7 years ago

On CJK, the width of borders are drawn as two cells.

two cells

Because those characters are East Asian Ambiguous Widths. It will be rendered as two cells in the future. But currently, most of terminal doesn't use Unicode9 character widths. This is workaround until the support of terminals.

See also https://github.com/jroimartin/gocui/issues/49

Below is after applying this patch. After patched

jroimartin commented 7 years ago

Thanks for the PR. I think it's a good idea to support ASCII line art, however I would prefer it to be configurable by the user and not only enabled when runewidth.IsEastAsian() returns true.

So, I created #93 to support this use case. What do you think? It allow gocui users to decide how they want to draw the interface. For instance, depending on runewidth info.