mirror of
https://github.com/xemu-project/imgui.git
synced 2024-11-23 18:29:51 +00:00
Fixed trailing \n reporting extra text height
This commit is contained in:
parent
a4b96445e8
commit
9169b2911c
@ -5079,7 +5079,7 @@ ImVec2 ImBitmapFont::CalcTextSize(float size, float max_width, const char* text_
|
|||||||
text_size.y += line_height;
|
text_size.y += line_height;
|
||||||
line_width = 0;
|
line_width = 0;
|
||||||
}
|
}
|
||||||
if (const FntGlyph* glyph = FindGlyph((unsigned short)c))
|
else if (const FntGlyph* glyph = FindGlyph((unsigned short)c))
|
||||||
{
|
{
|
||||||
const float char_width = (glyph->XAdvance + Info->SpacingHoriz) * scale;
|
const float char_width = (glyph->XAdvance + Info->SpacingHoriz) * scale;
|
||||||
//const float char_extend = (glyph->XOffset + glyph->Width * scale);
|
//const float char_extend = (glyph->XOffset + glyph->Width * scale);
|
||||||
|
Loading…
Reference in New Issue
Block a user