truncate white space character (U-0020) at wrapping point - ref #2670
This commit is contained in:
parent
ccc4a63cb9
commit
08986ca8a1
1 changed files with 4 additions and 2 deletions
|
@ -281,11 +281,13 @@ void text_layout::break_line_icu(std::pair<unsigned, unsigned> && line_limits)
|
||||||
{
|
{
|
||||||
break_position = line.last_char();
|
break_position = line.last_char();
|
||||||
}
|
}
|
||||||
|
bool adjust_for_space_character = break_position > 0 && text[break_position - 1] == 0x0020;
|
||||||
|
|
||||||
text_line new_line(last_break_position, break_position);
|
text_line new_line(last_break_position, adjust_for_space_character ? break_position - 1 : break_position);
|
||||||
clear_cluster_widths(last_break_position, break_position);
|
clear_cluster_widths(last_break_position, adjust_for_space_character ? break_position - 1 : break_position);
|
||||||
shape_text(new_line);
|
shape_text(new_line);
|
||||||
add_line(std::move(new_line));
|
add_line(std::move(new_line));
|
||||||
|
|
||||||
last_break_position = break_position;
|
last_break_position = break_position;
|
||||||
i = break_position - 1;
|
i = break_position - 1;
|
||||||
current_line_length = 0;
|
current_line_length = 0;
|
||||||
|
|
Loading…
Reference in a new issue