diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index a24d6ea4e..89c4140b5 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -63,6 +63,8 @@ Other changes: windows with the ImGuiWindowFlags_NoNavInputs flag. (#8231) - Debug Tools: Debug Log: hovering 0xXXXXXXXX values in log is allowed even if a popup is blocking mouse access to the debug log window. (#5855) +- Fonts: Fixed miscalculation of Ellipsis ("...") character width when automatically + created from a single comma character, affecting some fonts/settings (not all). - Demo: Added label edition to Property Editor demo + fix an ID issue. (#8266) [@moritz-h] - Misc: Fixed misc/cpp/imgui_stdlib.h/.cpp not supporting IMGUI_DISABLE. (#8294) [@juur] - Backends: Allegro5: Avoid calling al_set_mouse_cursor() repeatedly since it appears diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 42bfb7162..9e155f592 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -3799,8 +3799,8 @@ void ImFont::BuildLookupTable() const ImFontGlyph* glyph = FindGlyph(dot_char); EllipsisChar = dot_char; EllipsisCharCount = 3; - EllipsisCharStep = (glyph->X1 - glyph->X0) + 1.0f; - EllipsisWidth = EllipsisCharStep * 3.0f - 1.0f; + EllipsisCharStep = (float)(int)(glyph->X1 - glyph->X0) + 1.0f; + EllipsisWidth = glyph->X0 + EllipsisCharStep * 3.0f - 1.0f; } }