-
Notifications
You must be signed in to change notification settings - Fork 171
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
imgui cannot show utf-8 chinese character correctly,how to solve #237
Comments
Hello. Can you please show me what you're seeing instead? P.S. Does the custom font work for ASCII characters? |
Doing And you should only call (if this doesn't help, I'll come up with a good starting example tomorrow) |
You're not calling ImVector<ImWchar> ranges;
ImFontGlyphRangesBuilder builder;
builder.AddText("Hello world");
builder.AddChar(0x7262);
builder.AddRanges(io.Fonts->GetGlyphRangesJapanese());
builder.BuildRanges(&ranges);
io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels, NULL, ranges.Data);
io.Fonts->Build(); Works for me with i.e. cyrllic glyph ranges. |
The text was updated successfully, but these errors were encountered: