-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Loading Chinese front is too slow on opengl2 & glfw2. #5811
Comments
I don't believe this has anything to do with the backends. The reason it stuck at You can build it before entering the render loop using this, to see if the problem really is because of building the font: io.Fonts->Build(); Dear ImGui has two official font rasterizers, TrueType (default option) and FreeType, this is what responsible for building the fonts, assuming you're using the TrueType rasterizer, you can measure the performance of the ImFontAtlasBuildWithStbTruetype function to make sure that's the problem. If it is really that slow, what you could do is build once and write the atlas texture into an image, use it as a cache then load the atlas from it. It requires a lot of code and modifications so I'm not sure if I want to post it here. |
Its going to be slow if you load full ranges. See https://github.com/ocornut/imgui/blob/master/docs/FONTS.md for references. |
@ocornut Also, why isn't there an option to use a cached atlas instead of building it every time making the load time longer? Is there any reason not to do so? |
GetGlyphRangesChineseFull is slow, GetGlyphRangesChineseSimplifiedCommon lacks lots of common chars
|
using slow front:
|
FYI, work on |
ImGui_ImplOpenGL2_NewFrame()
takes more than 30 seconds When I load the Chinese font.load front code
The text was updated successfully, but these errors were encountered: