Read the system CJK font once, and hold fonts as ImFont pointers
Each of the four fonts merged the system CJK font from a fresh read of its file, twice, and never freed it. It is now read once and shared. Startup memory with a document open went from 412 MB to 269 MB.
This commit is contained in:
1 parent
2f1e75da37
commit
20209e655e
12 files changed
+58
-106
No files matched your search
@@ -720,7 +720,7 @@ void animations_update(Panel& panel, AnimationsPanel& animations)
|
||||
tooltip_name_draw(resources, animation.name);
|
||||
if (model.animations.defaultAnimation == animation.name)
|
||||
{
|
||||
ImGui::PushFont(resources.fonts[FONT_ITALICS].get(), FONT_SIZE);
|
||||
ImGui::PushFont(resources.fonts[FONT_ITALICS], FONT_SIZE);
|
||||
ImGui::TextUnformatted(localize.get(BASIC_DEFAULT));
|
||||
ImGui::PopFont();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user