-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Unable to render character symbols #565
Comments
Hello, 1/ 2/ |
Sorry to interfere with this thread...
That's correct: 2122 is the hex code of the UTF8 character. For the answer, specifying the ranges this way works for me:
P.S. Here are some UTF8 glyphs that I find useful (but not all ttf files have all of them):
There are probably many more... it should be handy to have a complete list of the glyphs that could be useful inside ImGui. |
None of the value you are listing are UTF-8 representation of those characters. They are all Unicode codepoints not UTF-8 representation. UTF-8 for U2122 is 0xE2 0x84 0xA2 If you use |
Yes, you're right. u2122 seems to be UTF16, according to the link you posted! However, @anotherzooanimal, I suggest you use the encoded glyphs directly, e.g.:
|
Thank you so much for the help. You are correct about using the HEX representation Ocornut, that along with using the suggestion that Flix01 made about setting the range corrected the issue. |
When attempting to render character symbols it seems to fail rendering. For example, lets say I were to attempt to render the trademark symbol:
/* This should render a ™ */
U+2122 (0x99): Trade Mark Sign
ImGui::Text("\u2122");
When I am loading my font, I am using:
arial16 = io.Fonts->AddFontFromFileTTF("C:\windows\fonts\arial.ttf", 16.0f, &config);
And the results are that nothing displays. If I were to change this to something like:
ImGui::Text("a");
Everything renders fine.
Is there something that I am missing for using a character like this?
The text was updated successfully, but these errors were encountered: