1
0
Fork 0

Fix: Typo in variable name.

pull/10922/head
Michael Lutz 2023-05-01 15:22:23 +02:00 committed by Loïc Guilloux
parent e53caf8f01
commit 85d2f80817
1 changed files with 7 additions and 7 deletions

View File

@ -347,7 +347,7 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF
} }
/* If the text does not fit into the available width, find a suitable breaking point. */ /* If the text does not fit into the available width, find a suitable breaking point. */
int remaing_offset = (last_run - 1)->len; int remaining_offset = (last_run - 1)->len;
if (cur_width > max_width) { if (cur_width > max_width) {
std::vector<SCRIPT_LOGATTR> log_attribs; std::vector<SCRIPT_LOGATTR> log_attribs;
@ -390,9 +390,9 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF
num_chars -= run->len; num_chars -= run->len;
if (num_chars <= 0) { if (num_chars <= 0) {
remaing_offset = num_chars + run->len + 1; remaining_offset = num_chars + run->len + 1;
last_run = run + 1; last_run = run + 1;
assert(remaing_offset - 1 > 0); assert(remaining_offset - 1 > 0);
break; break;
} }
} }
@ -415,8 +415,8 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF
UniscribeRun run = *i_run; UniscribeRun run = *i_run;
/* Partial run after line break (either start or end)? Reshape run to get the first/last glyphs right. */ /* Partial run after line break (either start or end)? Reshape run to get the first/last glyphs right. */
if (i_run == last_run - 1 && remaing_offset < (last_run - 1)->len) { if (i_run == last_run - 1 && remaining_offset < (last_run - 1)->len) {
run.len = remaing_offset - 1; run.len = remaining_offset - 1;
if (!UniscribeShapeRun(this->text_buffer, run)) return nullptr; if (!UniscribeShapeRun(this->text_buffer, run)) return nullptr;
} }
@ -432,9 +432,9 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF
cur_pos += run.total_advance; cur_pos += run.total_advance;
} }
if (remaing_offset < (last_run - 1)->len) { if (remaining_offset < (last_run - 1)->len) {
/* We didn't use up all of the last run, store remainder for the next line. */ /* We didn't use up all of the last run, store remainder for the next line. */
this->cur_range_offset = remaing_offset - 1; this->cur_range_offset = remaining_offset - 1;
this->cur_range = last_run - 1; this->cur_range = last_run - 1;
assert(this->cur_range->len > this->cur_range_offset); assert(this->cur_range->len > this->cur_range_offset);
} else { } else {