Gui.cs: Must measure output size with Rune.ColumnWidth

Created on 3 Feb 2018  路  8Comments  路  Source: migueldeicaza/gui.cs

Many characters that take up two slots are not properly rendered as we render those two, but do not fully fill the requested region. Need to use Rune.ColumnWidth to compute the current position.

1.0

All 8 comments

@migueldeicaza do you have a test case for this?

FWIW, this is a disaster. I dare anyone to follow the discussions w.r.t. wide unicode chars in Windows Terminal land and successfully follow along... Or have any idea what we should do.

Examples:

FWIW, I believe at some point I modified the code (in ConsoleDriver? to explicitly ignore Runes with ColumnWidth > 1 and print the default char as a work around of this issue until it can be addressed correctly. In #949, it appears @BDisp discovered that I missed a case.

@migueldeicaza I think maybe it's time to use System.Text.Rune.

I submitted a PR at https://github.com/migueldeicaza/NStack/pull/48 to be able to control what kind of rune is being passed to AddRune. I hope that @migueldeicaza takes into account to be able to come up with a solution.

The patch from @BDisp is now merged and should be on the new NStack.Core

@migueldeicaza there is another PR (https://github.com/migueldeicaza/NStack/pull/52) that fixes the "Chess Symbols (U+1fa00-1fa0f)". Thanks.

Merged - I will release a new NStack in the morning.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

UnrealSecurity picture UnrealSecurity  路  4Comments

migueldeicaza picture migueldeicaza  路  6Comments

TylerLeonhardt picture TylerLeonhardt  路  3Comments

tig picture tig  路  4Comments

daltskin picture daltskin  路  7Comments