Open genleung opened 7 years ago
I can confirm this bug
A workaround is to build the font before setup()
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.Fonts->AddFontDefault();
io.Fonts->AddFontFromFileTTF("Roboto-Medium.ttf", 16.0f);
gui.setup();
yes, font loading need to be done before setting up the gui
.
Confirm this issue also.
Tried this, and been through all the docs I can find and cannot load any fonts. Crashes because it can';t find or load font??? Hmmm...
Would love too know how you get fonts to load.
------------------ this didn't work:
A workaround is to build the font before setup()
ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); io.Fonts->AddFontDefault(); io.Fonts->AddFontFromFileTTF("Roboto-Medium.ttf", 16.0f); gui.setup();
I try to load a CJK font after gui.setup() :
It seems that the font could be loaded, but the whole window texts remain the same as the original look. These code lines actually work well in the ImGui opengl demo examples.
And I try to load fonts in EngineGLFW.cpp:
This time, it got crashed by a segmentation fault.
I also tried to load another Latin-based font like ProggyClean.ttf companied with ImGui, and the problem remains the same.