-
-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Some Emojis make the layout appear "glitchy" #929
Comments
I'll add one more piece of information: according to what I've deduced from the However, not all extended characters have a size of 2. When I look at the Konsole code (whose display is correct), |
Thanks for reporting this! Here is FTXUI equivalent to this table: FTXUI/src/ftxui/screen/string.cpp Lines 31 to 1077 in dfb9558
I believe both FTXUI adnd konsole are equivalent. They should attributes a size of 1 for I see this library has some special handling for Any advice are appreciated ! |
Hey again ! It seems that when i remove the last unicode character from the emoji (in my ide some emoji are displayed as two characters wide, and i can backspace once to remove a character from it), it renders properly ! const std::string health_icon = "❤"; // Heart icon The line above works, and contains only one unicode character const std::string health_icon = "❤️"; // Heart icon This line however doesn't Note that on the screen, the rendered heart from the icons is the right one |
Hey Arthur,
I'm making a textual game, and trying to use some icons to make my game look better.
It appears that some emojis (not all of them), make the layout appear glitchy, i'm talking especially about this emoji: ❤️
But for example this one: ✊ is not causing any issues.
It renders on the screen though, just makes everything glitchy on updates (e.g. moving the cursor, new selection on a dropdown)
Do you have any ideas on why ? If i can do something to fix this.
Note that I'm using Windows, powershell with a nerd font.
From the screen, the second heart emoji is a working one, its a slight difference only, but it's triggering to be restricted to a few only !
Also it might be a duplicate, but I was unable to use the other issues as valuable ressources for my use case (maybe I'm wrong)
For the code, thats basically something like this (this is pseudo code, it's taken from a larger code segment, but shows the idea):
The text was updated successfully, but these errors were encountered: