-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
error to show many text after AddFontFromFileTTF #6251
Comments
This has come up before but I can't for the life of me remember what the underlying cause was. I think it was due to an outdated backend and/or a buggy custom backend. It would be helpful if you filled out the issue template, particularly the parts about what version of Dear ImGui and what backends you're using. |
Thank you for your reply Version/Branch of Dear ImGui: Back-end/Renderer/Compiler/OS Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp |
Thank you for providing those details! Are you using an Intel GPU? And either way: Can you please try updating your drivers and see if the issue goes away? This appears to be related to #5617, #5655, and #5709 (comment) I think we've been assuming those were related to #4832, but you're using a version of Dear ImGui that was supposed to fix 4832...so maybe not. |
Thank you for your reply Thank you for your help |
That much text definitely exceeds what 16 bit indices can do in a single batch (50 lines * 407 chars * 4 vertices = 81400 vertices). With the non-default font at least, with the default one enough seems to be clipped out to make it fit again. If you draw shorter, but more lines, it should happen with the default font as well. Switching to 32 bit indices should circumvent the problem. |
You should have gotten an assert for that, if your build setup doesn't show assert you are going to have severe problems using this library. |
In addition to what Daniel and Omar pointed out: Is there a reason you were using the legacy |
Thank you for your suggestion. I'll try something |
Are you sure you put this typedef in imconfig.h and not elsewhere? |
Closing as generally answered. Feel free to post details or further things here if needed. |
My Issue/Question:
How do I show many text after AddFontFromFileTTF?
I need show many text the same time using ImGuI::Text()
I've adopted the code to my needs:
This works correctly with the default font
but If I load the font such as
io.Fonts->AddFontFromFileTTF( "Imgui\\misc\\fonts\\Roboto-Medium.ttf",10, NULL);
The text was updated successfully, but these errors were encountered: