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

Additional wide characters #66

Open
takluyver opened this issue Apr 30, 2015 · 5 comments
Open

Additional wide characters #66

takluyver opened this issue Apr 30, 2015 · 5 comments

Comments

@takluyver
Copy link

Originally reported as ipython/ipython#8361 - 啊, U+554A, displays wider than a standard character, at least in the monospace font used in my browser. Using it term.js therefore breaks the layout. Adding it to isWide() fixes things. It's a Han character, and I assume that many of the nearby codepoints will behave similarly. But I don't know how many, or whether there are other fonts that fit them into a standard width.

@takluyver
Copy link
Author

There is a Python library wcwidth with tables of wide and combining characters; this could be adapted to JS.

@chjj
Copy link
Owner

chjj commented May 21, 2015

@takluyver, JS will be a bit different since it's utf-16 and has to deal with surrogate pairs as well. I've implement wide chars, surrogate pairs, and zero-width combining chars for blessed: https://github.com/chjj/blessed/blob/master/lib/unicode.js

That's, in a way, sort of the inverse of what we want to do here, but the unicode library above will be useful. It's a compilation of a number of helpful unicode modules for node.

@liuzheng
Copy link

liuzheng commented Jun 4, 2015

here is what you want
#72

@takluyver
Copy link
Author

I spotted this blog post about the challenges of trying to fit unicode characters to a monospace grid: http://denisbider.blogspot.co.uk/2015/09/when-monospace-fonts-arent-unicode.html

@yoshiokatsuneo
Copy link

Does my Pull-Request that support CJK languages help ?
#97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants