Fonts: added ImGuiStyle::FontSizeBase. Ensuring PushFontSize() works before main loop and across NewFrame().

# Conflicts:
#	imgui.cpp
This commit is contained in:
ocornut
2025-05-26 20:24:06 +02:00
parent b029be6b6c
commit 1e118ab891
5 changed files with 125 additions and 56 deletions

View File

@@ -3190,7 +3190,7 @@ static void ImFontAtlasBuildNotifySetFont(ImFontAtlas* atlas, ImFont* old_font,
bool need_bind_ctx = ctx != curr_ctx;
if (need_bind_ctx)
ImGui::SetCurrentContext(ctx);
ImGui::SetCurrentFont(new_font, ctx->FontSize);
ImGui::SetCurrentFont(new_font, ctx->FontSizeBeforeScaling, ctx->FontSize);
if (need_bind_ctx)
ImGui::SetCurrentContext(curr_ctx);
}