layout: Make all word separators justification opportunities (#30866)

This change adapts both layout and legacy layout to the specification
which gives a list of word separators to use as justification
opportunities.
This commit is contained in:
Martin Robinson 2023-12-21 23:49:24 +01:00 committed by GitHub
parent 8e31daeb6b
commit 709d00583f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 150 additions and 37 deletions

View file

@ -783,7 +783,9 @@ fn glyphs(
point,
};
glyphs.push(glyph);
} else {
}
if glyph.char_is_word_separator() {
origin.x += justification_adjustment;
}
origin.x += Length::from(glyph.advance());