Skip to content

Commit

Permalink
OGRE13 imgui: Re-added font
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp committed Sep 21, 2023
1 parent cded949 commit 4751803
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/main/gui/GUIManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ void GUIManager::SetupImGui()
// see OGRE source file '/Samples/Simple/include/ImGuiDemo.h'
m_imgui_overlay = new Ogre::ImGuiOverlay();

// Load font
m_imgui_overlay->addFont("rigsofrods/fonts/Roboto-Medium",
ContentManager::ResourcePack::FONTS.resource_group_name);

// handle DPI scaling
float vpScale = Ogre::OverlayManager::getSingleton().getPixelRatio();
ImGui::GetIO().FontGlobalScale = std::round(vpScale); // default font does not work with fractional scaling
Expand Down

0 comments on commit 4751803

Please sign in to comment.