fix double-byte, if needed multi supported same way#72
fix double-byte, if needed multi supported same way#72liuzheng wants to merge 1 commit intochjj:masterfrom
Conversation
There was a problem hiding this comment.
I'm pretty sure this should not be every character over 127 - there are many characters beyond that which should still be displayed as single width, like £ (163), or ø (248). Those are just examples, there are many, many more, and working out which ones need width adjustment is tricky.
I'm also not sure where the 0.7 comes from. This may work for the wide characters of one particular font, but I wouldn't rely on it working in general.
There is already a mechanism for dealing with wide characters, which works by allowing them twice the normal space in the grid. However, it doesn't know about all the wide characters, as described in #66.
There was a problem hiding this comment.
127 and 0.7 also my empirical data, so maybe just fit for me
thanks for your work!
|
The isWide() check was a naive implementation. It was never meant to work entirely properly. This will not work until the This looks like a quick fix, but it will break in a number of situations. I'm not sure what the significance is of checking whether a character is non-ascii either. Closing until an actual suitable solution is found. The solution is in blessed, but if we want to implement it in term.js, we have to work backwards since blessed renders to the terminal, and term.js is the terminal. We'll be doing the inverse. |
|
I tried to made a generic solution for all the non-english characters. |
The red line is original window size col=80
After clicked the
resizeButton , col changed to 100so you can see
my test env is Mac+chrome maybe it different from others, I think just a little