فهرست منبع

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

ocornut 11 ماه پیش
والد
کامیت
31b967f098
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      imgui_draw.cpp

+ 1 - 1
imgui_draw.cpp

@@ -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;