Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use wcwidth to handle fullwidth characters #16

Open
JeroenDelcour opened this issue Jan 11, 2022 · 0 comments
Open

Use wcwidth to handle fullwidth characters #16

JeroenDelcour opened this issue Jan 11, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@JeroenDelcour
Copy link
Owner

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 JeroenDelcour added enhancement New feature or request good first issue Good for newcomers labels Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant