Skip to content

Commit

Permalink
Overlay: ImGui - respect ogre default codepoint range
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Aug 4, 2023
1 parent cc52377 commit 69e5077
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Components/Overlay/src/OgreImGuiOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ ImFont* ImGuiOverlay::addFont(const String& name, const String& group)

ImGuiIO& io = ImGui::GetIO();
const ImWchar* cprangePtr = io.Fonts->GetGlyphRangesDefault();
if (!cprange.empty())
{
cprange.push_back(0); // terminate
mCodePointRanges.push_back(cprange);
// ptr must persist until createFontTexture
cprangePtr = mCodePointRanges.back().data();
}
if (cprange.empty())
cprange = {32, 126}; // ogre default

cprange.push_back(0); // terminate
mCodePointRanges.push_back(cprange);
// ptr must persist until createFontTexture
cprangePtr = mCodePointRanges.back().data();

float vpScale = OverlayManager::getSingleton().getPixelRatio();

Expand Down

0 comments on commit 69e5077

Please sign in to comment.