Merge pull request #191 from dovreshef/fix_rtl_issue_190
Fix rendering of RTL words
This commit is contained in:
commit
e2adc1e8da
1 changed files with 4 additions and 3 deletions
|
|
@ -1221,11 +1221,12 @@ impl ShapeLine {
|
||||||
} else {
|
} else {
|
||||||
0.0
|
0.0
|
||||||
};
|
};
|
||||||
let y_advance = font_size * glyph.y_advance;
|
|
||||||
glyphs.push(glyph.layout(font_size, x, y, x_advance, span.level));
|
|
||||||
if self.rtl {
|
if self.rtl {
|
||||||
x -= x_advance;
|
x -= x_advance;
|
||||||
} else {
|
}
|
||||||
|
let y_advance = font_size * glyph.y_advance;
|
||||||
|
glyphs.push(glyph.layout(font_size, x, y, x_advance, span.level));
|
||||||
|
if !self.rtl {
|
||||||
x += x_advance;
|
x += x_advance;
|
||||||
}
|
}
|
||||||
y += y_advance;
|
y += y_advance;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue