Skip blank words at start of line
This commit is contained in:
parent
d22c0f43d4
commit
a30576e1eb
1 changed files with 5 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ impl ShapeLine {
|
|||
|
||||
if line_rtl {
|
||||
for range in runs.into_iter().rev() {
|
||||
let span_rtl = levels[range.start].is_rtl();
|
||||
let span_rtl = levels[range.start].is_rtl();
|
||||
spans.push(ShapeSpan::new(
|
||||
font_system,
|
||||
line,
|
||||
|
|
@ -606,6 +606,10 @@ impl ShapeLine {
|
|||
y = 0.0;
|
||||
}
|
||||
|
||||
if x == start_x && word.blank {
|
||||
continue;
|
||||
}
|
||||
|
||||
for glyph in &word.glyphs {
|
||||
let x_advance = font_size as f32 * glyph.x_advance;
|
||||
let y_advance = font_size as f32 * glyph.y_advance;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue