Russian language breaks the application #4544
J0hannex
started this conversation in
New Users Build/Link/Run issues ONLY!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, i have trouble with Russian language (Cyrillic). What i using: IDE Visual Studio 2019(tools v142), ISO c++17, DXSDK v10. Imgui v1.84b
After many examples and tips, I decided to create issue.
This problem appears as in demo window (DX9 WIN32 example) as in game with DX9 detours hook.
Step 1 I have uploaded a font with Russian:
ImGuiIO& io = ImGui::GetIO();
io.Fonts->AddFontDefault();
ImFont* font = io.Fonts->AddFontFromFileTTF("../arial.ttf", 15.0f, NULL, io.Fonts->GetGlyphRangesCyrillic());
IM_ASSERT(font != NULL);
Step 2 Then i create textbox with russian chars:
ImGui::Begin("Demo");
ImGui::PushFont(font);
ImGui::Text(u8"Русский");
ImGui::PopFont();
After starting the demo project, the window where the graphical shell with the imgui menu should be created simply freezes and does not respond. I just see a white empty window.
If i change code form Step 1 with one below nothing is changes:
ImFontConfig font_config; font_config.OversampleH = 1; font_config.OversampleV = 1; font_config.PixelSnapH = 1;
static const ImWchar ranges[] = { 0x0020, 0x00FF, 0x0400, 0x044F, 0, };
ImFont* font = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Tahoma.ttf", 14.0f, &font_config, ranges);
In project options uses multibyte characters set, switching to unicode has no effect.
Beta Was this translation helpful? Give feedback.
All reactions