vtr0n / TelegramTUI

Telegram client on your terminal
MIT License
817 stars 70 forks source link

Users with Emoji in their name breaks UI #29

Open dragos240 opened 5 years ago

dragos240 commented 5 years ago

I just started up TelegramTUI and noticed that users with emoji in their names will offset the borders in the user window and spill out into the main chat window.

Example: Example

I've had a similar problem with another application I've helped develop. The problem there was that unicode emoji are multibyte characters, leading the drawing routines to miscalculate borders. To fix this, I switched to a curses based interface which uses windows. The worst case scenario in that case would be that the text would wrap around to the next line. So I suggest switching to curses and accounting for multibyte characters.

vtr0n commented 5 years ago

Thanks fo report! Try to fix it a little bit later

LordManhattan commented 5 years ago

@dragos240 what are you using to show emojis in CLI? I'm "shopping" around a little atm to find one that fits me best, but I'm curious to what you're using.

Cheers

dragos240 commented 5 years ago

I'm using Teriminator with Noto-Emoji font.