Generated lines should *always* include their end spaces, there should be no gaps.
This commit is contained in:
parent
ab2b9cc733
commit
50a05df998
|
@ -432,7 +432,9 @@ impl<'gc> LayoutBox<'gc> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let next_breakpoint = last_breakpoint + breakpoint;
|
// This ensures that the space causing the line break
|
||||||
|
// is included in the line it broke.
|
||||||
|
let next_breakpoint = min(last_breakpoint + breakpoint + 1, text.len());
|
||||||
|
|
||||||
Self::append_text_fragment(
|
Self::append_text_fragment(
|
||||||
context.gc_context,
|
context.gc_context,
|
||||||
|
@ -443,7 +445,7 @@ impl<'gc> LayoutBox<'gc> {
|
||||||
span,
|
span,
|
||||||
);
|
);
|
||||||
|
|
||||||
last_breakpoint = next_breakpoint + 1;
|
last_breakpoint = next_breakpoint;
|
||||||
if last_breakpoint >= text.len() {
|
if last_breakpoint >= text.len() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue