From 82b81fce685e303db2355a04e1c257eb2eb0d914 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 3 Feb 2025 19:36:11 +0100 Subject: [PATCH] Fonts: PushFontSize() with -1 uses sources[0]'s size for now (backward compat design) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index dd4dbf15a..f416223cd 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8636,7 +8636,7 @@ void ImGui::PushFont(ImFont* font, float font_size) if (font == NULL) font = GetDefaultFont(); if (font_size < 0.0f) - font_size = g.FontSize; + font_size = font->Sources[0].SizePixels; // g.FontSize; g.FontStack.push_back({ font, font_size }); SetCurrentFont(font, font_size); }