From b2ecceab441d7d5d0cff1ed6b958a20a8ddc4b48 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 13 May 2021 15:00:40 +0200 Subject: [PATCH] Fix text processing with wrapping enabled if layout bounds width equals the line width #518 --- Source/Engine/Render2D/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Render2D/Font.cpp b/Source/Engine/Render2D/Font.cpp index fd2e64763..537c604d9 100644 --- a/Source/Engine/Render2D/Font.cpp +++ b/Source/Engine/Render2D/Font.cpp @@ -166,7 +166,7 @@ void Font::ProcessText(const StringView& text, Array& 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;