mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Fonts: Fixed miscalculation of Ellipsis ("...") character width when automatically created from a single comma character.
This commit is contained in:
parent
1c67a3412e
commit
90094a871a
2 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue