Fix text processing with wrapping enabled if layout bounds width equals the line width

#518
This commit is contained in:
Wojtek Figat
2021-05-13 15:00:40 +02:00
parent fb5c45f474
commit b2ecceab44

View File

@@ -166,7 +166,7 @@ void Font::ProcessText(const StringView& text, Array<FontLineCache>& outputLines
xAdvance = (kerning + entry.AdvanceX) * scale;
// Check if character fits the line or skip wrapping
if (cursorX + xAdvance < boundsWidth || layout.TextWrapping == TextWrapping::NoWrap)
if (cursorX + xAdvance <= boundsWidth || layout.TextWrapping == TextWrapping::NoWrap)
{
// Move character
cursorX += xAdvance;