From 31b967f098dc53a6bb36f9be36f4a9e5d592f775 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 7 Nov 2024 19:35:00 +0100 Subject: [PATCH] Fix 01d27a4 (sorry I cherry-picked from wrong branch) --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 7934949ec..48d42f392 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -4016,7 +4016,7 @@ ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, cons continue; } - const float char_width = ImFontGetCharAdvanceX(this, c); + const float char_width = ImFontGetCharAdvanceX(this, c) * scale; if (line_width + char_width >= max_width) { s = prev_s;