1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Font: Internals: make used page maps smaller. Since it's extremely rarely used and for iterations only. ~34->16 bytes with ImWchar32.

This commit is contained in:
ocornut 2025-01-16 22:30:43 +01:00
parent f2262eb81a
commit 487d7f9a29
3 changed files with 13 additions and 13 deletions

View file

@ -16177,9 +16177,9 @@ void ImGui::DebugNodeFont(ImFont* font)
// Skip ahead if a large bunch of glyphs are not present in the font (test in chunks of 4k)
// This is only a small optimization to reduce the number of iterations when IM_UNICODE_MAX_CODEPOINT
// is large // (if ImWchar==ImWchar32 we will do at least about 272 queries here)
if (!(base & 4095) && font->IsGlyphRangeUnused(base, base + 4095))
if (!(base & 8191) && font->IsGlyphRangeUnused(base, base + 8191))
{
base += 4096 - 256;
base += 8192 - 256;
continue;
}