1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-30 18:34:34 +01:00

Fix 01d27a4 (sorry I cherry-picked from wrong branch)

This commit is contained in:
ocornut 2024-11-07 19:35:00 +01:00
parent 01d27a4acd
commit 31b967f098

View File

@ -4016,7 +4016,7 @@ ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, cons
continue; continue;
} }
const float char_width = ImFontGetCharAdvanceX(this, c); const float char_width = ImFontGetCharAdvanceX(this, c) * scale;
if (line_width + char_width >= max_width) if (line_width + char_width >= max_width)
{ {
s = prev_s; s = prev_s;