Skip to content

Commit e2adc1e

Browse files
authored
Merge pull request pop-os#191 from dovreshef/fix_rtl_issue_190
Fix rendering of RTL words
2 parents 30398c2 + ba96cce commit e2adc1e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/shape.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1221,11 +1221,12 @@ impl ShapeLine {
12211221
} else {
12221222
0.0
12231223
};
1224-
let y_advance = font_size * glyph.y_advance;
1225-
glyphs.push(glyph.layout(font_size, x, y, x_advance, span.level));
12261224
if self.rtl {
12271225
x -= x_advance;
1228-
} else {
1226+
}
1227+
let y_advance = font_size * glyph.y_advance;
1228+
glyphs.push(glyph.layout(font_size, x, y, x_advance, span.level));
1229+
if !self.rtl {
12291230
x += x_advance;
12301231
}
12311232
y += y_advance;

0 commit comments

Comments
 (0)