Skip to content
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

Allow Gaia to display non-english text. #541

Open
reinux opened this issue Jul 4, 2023 · 8 comments
Open

Allow Gaia to display non-english text. #541

reinux opened this issue Jul 4, 2023 · 8 comments
Labels
enhancement gaia issue relating to Gaia game editor imgui issue originating from imgui*

Comments

@reinux
Copy link
Collaborator

reinux commented Jul 4, 2023

EDIT BY BRYAN: We no longer experience the hang due to what we presume is a common Windows update. However, entering CJK text doesn't work because the default imgui font we use doesn't support those characters. Also, the Windows IME helper window doesn't show up in Gaia either.

Trying to type in Japanese using IME first seems to cause diacritics on Latin letters as opposed to Japanese, and then eventually causes a crash.

IMGUI seems to support IME so I'm neither worried nor in a hurry, but it might be good to at least work around it (maybe even by disabling IME) to prevent crashing.

image

@bryanedds
Copy link
Owner

Is there a quick way to duplicate this on a standard US keyboard?

@reinux
Copy link
Collaborator Author

reinux commented Jul 4, 2023

On Windows, you can add new keyboards in the Language & region settings.

image

Once you have it installed, you can switch to Japanese on the bottom right of the Taskbar. Start + Space to switch between different keyboards, but Japanese also has a legacy English mode built in, so you may also need to do Alt + Backtick (`) to finally start typing.

After that, you can type as you normally would if you were typing Japanese in English, and then hit space for an (increasingly shoddy, AI-driven) autocomplete/autocorrect menu.

@bryanedds bryanedds added the bug label Jul 4, 2023
@bryanedds
Copy link
Owner

A couple notes:

I think SDL is also part of this input pipeline as well, since we get the text from the SDL_TEXTINPUT event.

Also, I'm using the standard, out-of-box ImGui font which I'm pretty sure only shows non-extended characters.

@reinux
Copy link
Collaborator Author

reinux commented Jul 4, 2023

I think in an ideal situation it would be using fallback fonts given by the system, so that Latin/ASCII characters are rendered using ImGui's monospace font, and everything else by the system font.

Or, something that might get a lot of people excited is one of the SNES style fonts, like the 8x8px Misaki or the 10x10 and 12x12 M+ BITMAP. Both have simple and very permissive licenses:

http://mplus-fonts.osdn.jp/mplus-bitmap-fonts/index.html#license
https://littlelimit.net/font.htm#license

@bryanedds
Copy link
Owner

This may be related - ocornut/imgui#5535

@bryanedds bryanedds added the low-hanging fruit issue that should be relatively easy to resolve label Oct 11, 2023
@bryanedds
Copy link
Owner

bryanedds commented Dec 7, 2023

Here's some additional context -

https://discourse.libsdl.org/t/can-i-use-sdl-disable-windows-ime-and-ignore-other-input-at-the-same-time-without-hacks/24468

Rust-SDL2/rust-sdl2#1041

glfw/glfw#41

As a workaround, I'm trying to disable windows IME in SDL2, but I'm not yet able to figure out how via SDL2-CS -

https://github.com/search?q=repo%3Aflibitijibibo%2FSDL2-CS+IME

@bryanedds bryanedds removed the low-hanging fruit issue that should be relatively easy to resolve label Dec 7, 2023
@bryanedds bryanedds added this to the ASAP milestone Dec 7, 2023
@bryanedds bryanedds added the imgui issue originating from imgui* label Dec 7, 2023
@bryanedds
Copy link
Owner

bryanedds commented Apr 12, 2024

whole tags of maybe related - https://github.com/ocornut/imgui/labels/ime

@bryanedds
Copy link
Owner

I added japanese lang support to my Windows 10 install and typed various japanese characters in Gaia, but was still unable to trigger a hang. Perhaps the OS call that led to the hang has been patched in a Windows update?

I asked rei to give me a specific japanese phrase to type so we can at least verify what seems to be a lack of hanging.

@bryanedds bryanedds changed the title Gaia hangs on IME input Gaia doesn't display non-english text. Apr 30, 2024
@bryanedds bryanedds removed this from the ASAP milestone Apr 30, 2024
@bryanedds bryanedds added the gaia issue relating to Gaia game editor label Jul 20, 2024
@bryanedds bryanedds changed the title Gaia doesn't display non-english text. Allow Gaia to display non-english text. Aug 22, 2024
@bryanedds bryanedds added enhancement and removed bug labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement gaia issue relating to Gaia game editor imgui issue originating from imgui*
Projects
None yet
Development

No branches or pull requests

2 participants