godot
godot copied to clipboard
TextEdit or LineEdit cannot input Chinese characters on the web
Tested versions
Maybe all versions have the same issue, I am using v4.2.2 stable.
System information
Windows10 -Godot v4.2.2.stable.official
Issue description
In Godot 4.2.2, LineEdit or TextEdit cannot input Chinese characters on the Web, but it works on PC. This issue may also affect other non-English characters. It is likely caused by the IME, as Unity also encounters similar problems. There isn't a good solution yet. Since Godot is an open-source community, we hope this bug can be fixed as soon as possible.
Steps to reproduce
Please using textedit or lineedit node in a scene, export to a web build, and download a Microsoft Pinyin input method or something similar to test it.
Minimal reproduction project (MRP)
The project is very simple, you can create by yourself, thank you!
This should be fixed in 4.3 already by #79362. Can you test 4.3-dev5 and confirm?
This should be fixed in 4.3 already by #79362. Can you test 4.3-dev5 and confirm?
I tried testing the web version with Microsoft Pinyin input method in the 4.3 dev5 version. There are two issues: first, Chinese characters are not displayed correctly (I am using a font that supports Chinese characters); second, the IME suggestion continuously moves downward as I type.
CC @bruvzg
first, Chinese characters are not displayed correctly
Web can't use system font, probably custom font is not set properly (it might be displayed correctly in the editor, since editor will use system fonts as fallback).
second, the IME suggestion continuously moves downward as I type.
Which browser are you using?
first, Chinese characters are not displayed correctly
Web can't use system font, probably custom font is not set properly (it might be displayed correctly in the editor, since editor will use system fonts as fallback).
second, the IME suggestion continuously moves downward as I type.
Which browser are you using?
I encounter the same issue when using the default font of Godot, but it works fine with NotoSansSC (Google font). The first issue might be font-related. I tested it on Chrome and Edge, and the suggestions gradually move down as I type.
It is highly likely that this is indeed a font issue
It is highly likely that this is indeed a font issue Is it possible to fix this issue in the 4.3 stable version?
It is highly likely that this is indeed a font issue About the second issue, I have tested it in the Firefox browser and it works well(the suggestions don't move down as I type), maybe it's a issuse related to the browser?
It might be a browser issue, AFAIK only Firefox has full IME implementation.
Font issue (if you mean loading system fonts) can't be fixed since none of the browsers implement the required API.
Loading custom fonts should already work fine. Note that a lot of fonts have CJK characters in a separate file (especially big pan-Unicode fonts like Noto), you should include all relevant files and setup font fallbacks in the import setting for it to work.
It might be a browser issue, AFAIK only Firefox has full IME implementation.
Font issue (if you mean loading system fonts) can't be fixed since none of the browsers implement the required API.
Loading custom fonts should already work fine. Note that a lot of fonts have CJK characters in a separate file (especially big pan-Unicode fonts like Noto), you should include all relevant files and setup font fallbacks in the import setting for it to work.
Since I am not very familiar with IME, I would like to ask when approximately can this move-downward issue be fixed for other web browsers? Typing input is a very important feature for my project.
I would like to ask when approximately can this move-downward issue be fixed for other web browsers?
Most likely it's a Windows specific Chromium bug (I can't reproduce it in any browser on macOS), and there is no API to control suggestion window position directly, so we can't really fix it (I'll try testing some possible workarounds later this week, but there's no guarantee it will do anything).
Font issue maybe related to #80237 ? It has caused similar problems in one project i help.