rpwoodbu / mosh-chrome

Mosh for Chrome
GNU General Public License v3.0
372 stars 59 forks source link

Windows monospaced fonts don't align properly #132

Closed colemickens closed 8 years ago

colemickens commented 8 years ago

This only affects me on Windows, where mosh for Chrome is still the best experience for moshing into my servers, despite "bash on Windows" due to hterm working better than conhost.exe.

This seems to be an issue regardless of the font. Here's three different fonts: http://imgur.com/a/GyCq3

You can see, depending on the font, there's either one big glitch, or one big glitch with some smaller ones interspersed as well.

The 'x' characters and the directory '>' arrows seem to not be rendered in the proper width. Not really sure what's at play here, especially since it only happens on Windows.

colemickens commented 8 years ago

Looks like this is not Mosh specific: http://i.imgur.com/ZiuNEVn.png

I still don't really know where to dig into this, so if you have any suggestions, it'd be great. Thanks!

colemickens commented 8 years ago

Native win32 and UWP are also affected, so this is clearly not a mosh issue: http://i.imgur.com/W4ht1s8.png

Feel free to close this unless anyone has any suggested workarounds. I'll close it soon if I don't hear anything.

rpwoodbu commented 8 years ago

This is almost certainly due to an unusual character being displayed that is wider than the normal set of what might be called "ASCII characters". I see a weird character inside the brackets on the left which is causing the issue. Alignment is a common problem for fixed-width situations displaying things like graphics and CJK characters.

colemickens commented 8 years ago

Yup, only an issue on Windows. Thanks for closing, I'll try to find someone in Windows to chase this down or find a workaround.

bitcrazed commented 8 years ago

@colemickens Hey Cole. Looks like the alignment issue is caused by the star symbol being wider than a single character cell:

image