# HG changeset patch # User Loïc Guilloux # Date 2024-01-12 18:40:08 # Node ID 0476346a6771defe55a1d778ccf384ffe05b3e9f # Parent f543fbd941c7262573af363aa4a87522d2e9f080 Fix #11752: [Win32] Wrong multi-line text layout due to incorrect partial run handling (#11761) diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp --- a/src/os/windows/string_uniscribe.cpp +++ b/src/os/windows/string_uniscribe.cpp @@ -415,7 +415,7 @@ static std::vector Uniscrib UniscribeRun run = *i_run; /* Partial run after line break (either start or end)? Reshape run to get the first/last glyphs right. */ - if (i_run == last_run - 1 && remaining_offset < (last_run - 1)->len) { + if (i_run == last_run - 1 && remaining_offset <= (last_run - 1)->len) { run.len = remaining_offset - 1; if (!UniscribeShapeRun(this->text_buffer, run)) return nullptr;