Skip blank words at start of line

This commit is contained in:
Jeremy Soller 2022-12-08 10:31:44 -07:00
parent d22c0f43d4
commit a30576e1eb
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -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;