-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Most emojis don't work on Windows #23093
Comments
did you compile with builtin_freetype option? |
I didn't specify I tried a couple of other emojis and some did work like ✔ I also tried using a func _ready():
var bytes = PoolByteArray()
bytes.push_back(0xF0)
bytes.push_back(0x9F)
bytes.push_back(0x98)
bytes.push_back(0x84)
text = bytes.get_string_from_utf8() Which should be this one https://apps.timwhitlock.info/unicode/inspect?s=%F0%9F%98%84 |
Most emotes have char codes > 0xFFFF. Godot string is based on On Linux an macOS |
Oh well, I updated the title of the issue to reflect that information. Thanks @bruvzg |
To be precise Unicode supplementary planes have much more stuff, not just emojis. BiDi/Shaping PR (#21791) I'm working on, should fix rendering of > 0xFFFF chars on all platforms, but |
How a bout switch to |
And it's probably better to switch to UTF-16 instead for several reasons:
|
I wrote some code to handle utf code conversion in c++ somewhere. I can take a look for it. wchar on windows is really quite a pain in the butt, but it can be worked with. update: I would love to be able to 😏 people in game :^) |
Godot is gonna support C++11 soon so what's the status on this? Are we using UTF-16? |
It's time to switch to char16_t or something else, as Godot now targets C++11. |
The same goes for Godots ord() where nearly all emojis return 32 (32 is actually the space " "), meaning that the emojis aren't recognized at all. ☹ |
Godot version:
Godot 3.1 master 0d8284d
OS/device including version:
Window 10
Issue description:
In theory, emoji support was added with this PR #15780 but I've been testing it and I can't get it to work. I tested it with the NotoColorEmoji.ttf font. That's the font I think @volzhs used for both that PR and this issue #10873 but I couldn't make it work. The font doesn't work on windows (opening it with the font viewer throws an error) because Windows doesn't support the type of color font googlefonts/noto-emoji#43 But I'm not sure if it has anything to do with the issue.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: