We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version/Branch of Dear ImGui:
Version: 1.79 Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp Compiler: MSVC v142 Visual Studio 2019 16 Operating System: Windows 10
My Issue/Question: calling ImFont->IsLoaded() returns false after loading a font successfully. works ok when not checking for loaded fonts.
Screenshots/Video
Example
void LoadImGuiFonts() { std::unordered_map<Enigma::String, ImFont*> m_fonts; static const auto& io = ImGui::GetIO(); m_fonts["Audiowide-Regular-45"] = io.Fonts->AddFontFromFileTTF(Constants::Resources::Fonts::AUDIOWIDE_FONT_PATH, 45.0f); m_fonts["Audiowide-Regular-20"] = io.Fonts->AddFontFromFileTTF(Constants::Resources::Fonts::AUDIOWIDE_FONT_PATH, 20.0f); m_fonts["Montserrat-Medium-45"] = io.Fonts->AddFontFromFileTTF(Constants::Resources::Fonts::MONTSERRAT_FONT_PATH, 45.0f); m_fonts["Montserrat-Medium-20"] = io.Fonts->AddFontFromFileTTF(Constants::Resources::Fonts::MONTSERRAT_FONT_PATH, 20.0f); m_fonts["Montserrat-Medium-12"] = io.Fonts->AddFontFromFileTTF(Constants::Resources::Fonts::MONTSERRAT_FONT_PATH, 12.0f); // Check if fonts are loaded for (const auto& [font_name, font] : m_fonts) { if (!font->IsLoaded()) // <---- returns false on loaded fonts, works ok when disabled. { const std::string err_msg = "Failed to load font Resources/Fonts/" + font_name; std::cerr << err_msg << endl; break; } } }
The text was updated successfully, but these errors were encountered:
duplicate of #2311 io.Fonts->Build() has to be called to rebuild the atlas.
Sorry, something went wrong.
No branches or pull requests
Version/Branch of Dear ImGui:
Version: 1.79
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp
Compiler: MSVC v142 Visual Studio 2019 16
Operating System: Windows 10
My Issue/Question:
calling ImFont->IsLoaded() returns false after loading a font successfully.
works ok when not checking for loaded fonts.
Screenshots/Video
Example
The text was updated successfully, but these errors were encountered: