1
0
Fork 0

Fix #11752: [Win32] Wrong multi-line text layout due to incorrect partial run handling (#11761)

pull/11762/head
Loïc Guilloux 2024-01-12 19:40:08 +01:00 committed by GitHub
parent 28efa65e0c
commit 03df70ce8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -415,7 +415,7 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF
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;