MonoGame.Extended icon indicating copy to clipboard operation
MonoGame.Extended copied to clipboard

[Gui] Multi-byte character support (for different languages) in the TextBox

Open esengine opened this issue 7 years ago • 11 comments

I am using WINDOWS, MonoGame.Extended.GUI library GuiTextBox, I can not open the IME, I want to enter multi-byte characters, not just single characters, how should I do?

esengine avatar Jan 05 '18 11:01 esengine

Not currently supported.

Honestly, I'm not even sure where to start with this. I don't know how I would test it or what use cases it would need to cover (I presume different languages).

craftworkgames avatar Jan 05 '18 11:01 craftworkgames

Yes, I use Chinese language. I saw in the example of MonoGame.Extended.GUI using DestopGL IME can be called out, but there is no way to multi-byte characters into the text box.

esengine avatar Jan 05 '18 11:01 esengine

If you want to have a go at implementing it yourself go head.

I'm not in a position to do it anytime soon.

craftworkgames avatar Jan 05 '18 11:01 craftworkgames

Well, still have to thank you very much. I will find ways to solve multi-byte characters

esengine avatar Jan 05 '18 11:01 esengine

http://community.monogame.net/t/i-encountered-a-problem-with-the-input-method/10577/6

esengine avatar May 03 '18 14:05 esengine

I initiated this question to the monogame community and got a reply. But I do not know how to start, monogame.extended will help me solve this problem?

esengine avatar May 03 '18 14:05 esengine

Sorry to say, this is not going to be a priority anytime soon. Chances are it won't be implemented unless someone else has a very strong desire to do so.

craftworkgames avatar May 09 '18 05:05 craftworkgames

We could really use some help with this issue.

If anyone has any experience with multi-byte characters please let us know.

craftworkgames avatar Sep 11 '18 06:09 craftworkgames

https://github.com/RabbitStewDio/Steropes.UI

I am looking for a project that supports inputting multiple bytes, but it uses spriteFont, I think we can learn from it.

esengine avatar Sep 13 '18 07:09 esengine

@craftworkgames, I have been working on modifying MonoGame to support multibyte characters(see my forks). The main issue is the lack of support within .Net/Mono for a single object solution(required for XNB support). Char only stores 16-bit values, requiring 2 Chars for full UTF-32 encoding. (not to mention the multi-char sequences, such as the flag of England) While, this does not help with the IME keyboard issue, I have created a platform dependent solution that renders text by passing a String to the system to render to a Bitmap. Please see here for the Gist for the Android version. (I have a Windows version as well, but it does not perform as well as the Android version, let me know, if you would like for me to post it).

stromkos avatar Feb 26 '19 00:02 stromkos

@stromkos That's really cool. Thanks for posting. I'm not really in a position right now to work on this issue but I'm sure what you've done will come in useful at some point to someone.

craftworkgames avatar Feb 26 '19 10:02 craftworkgames