Fix line width in LayoutLine for RTL

This commit is contained in:
Héctor Ramón Jiménez 2022-12-15 16:16:26 +01:00 committed by Jeremy Soller
parent 67950724c3
commit be4dc2749c

View file

@ -594,7 +594,7 @@ impl ShapeLine {
mem::swap(&mut glyphs, &mut glyphs_swap);
layout_lines.push(
LayoutLine {
w: x,
w: if self.rtl { start_x - x } else { x },
glyphs: glyphs_swap,
},
);
@ -624,7 +624,7 @@ impl ShapeLine {
mem::swap(&mut glyphs, &mut glyphs_swap);
layout_lines.push(
LayoutLine {
w: x,
w: if self.rtl { start_x - x } else { x },
glyphs: glyphs_swap,
},
);
@ -652,7 +652,7 @@ impl ShapeLine {
mem::swap(&mut glyphs, &mut glyphs_swap);
layout_lines.push(
LayoutLine {
w: x,
w: if self.rtl { start_x - x } else { x },
glyphs: glyphs_swap,
},
);
@ -666,7 +666,7 @@ impl ShapeLine {
if push_line {
layout_lines.push(
LayoutLine {
w: x,
w: if self.rtl { start_x - x } else { x },
glyphs,
},
);