tplot icon indicating copy to clipboard operation
tplot copied to clipboard

Use wcwidth to handle fullwidth characters

Open JeroenDelcour opened this issue 4 years ago • 0 comments

tplot currently assumes all characters are halfwidth. We could handle fullwidth characters by using wcwidth to get the displayed width of each character and then removing spaces from that row as needed to maintain alignment with the other rows.

I suspect this would have to be done in the __str__ method after converting the self._canvas array to a list of strings, since it will mean the canvas is no longer rectangular.

JeroenDelcour avatar Jan 11 '22 13:01 JeroenDelcour