segross / UnrealImGui

Unreal plug-in that integrates Dear ImGui framework into Unreal Engine 4.
MIT License
666 stars 211 forks source link

How to input Chinese? #48

Open Kill-Console opened 3 years ago

Kill-Console commented 3 years ago

After I call AddFontFromFileTTF to add a Chinese font, I can display Chinese but the inputtext widget still can not input Chisese. Any advice? Thanks !

segross commented 3 years ago

Hey, I think that I won't be able to help you much with this issue. When you run the original ImGui demo, outside of the Unreal Engine, do you have the same issue or is it something specific to this Unreal integration? I believe there is another thread mentioning related problem but it look from it, that there wasn't a good solution. Of course if there is anything specific that you would need to know, I can point to the relevant code.

DarienCaron commented 1 year ago

@Kill-Console Hello,

I'm looking to add Japanese language support using UnrealImGui. Can you tell me how you were able to display Chinese characters? I found that I needed to modify the ImGuiContextManager so that the appropriate font, character set, and glyphs were loaded into the font atlas before the proxy was created.

Any tips on the matter would be appreciated!

sammyfreg commented 1 year ago

You can always look at how I did it in UnrealNetImgui (look for the ' NETIMGUI_FONT_JAPANESE' define) UnrealNetImgui/NetImguiModule.cpp at master · sammyfreg/UnrealNetImgui · GitHub https://github.com/sammyfreg/UnrealNetImgui/blob/master/Source/Private/NetImguiModule.cpp

Steps done

Note: You do not need to also compile the Japanese font, you can just take my precompiled bin sources files.

On Wed, Feb 8, 2023 at 2:07 PM DarienCaron @.***> wrote:

@Kill-Console https://github.com/Kill-Console Hello,

I'm looking to add Japanese language support using UnrealImGui. Can you tell me how you were able to display Chinese characters? I found that I needed to modify the ImGuiContextManager so that the appropriate font, character set, and glyphs were loaded into the font atlas before the proxy was created.

Any tips on the matter would be appreciated!

— Reply to this email directly, view it on GitHub https://github.com/segross/UnrealImGui/issues/48#issuecomment-1422021813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESBPY4HOURIA5IOJ3GUBUDWWMSZFANCNFSM4522O4DA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

yixuanqi commented 1 year ago

@Kill-Console 兄弟你解决这个问题了吗