mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Prefer length and percentage for word spacing
This commit is contained in:
parent
7ed9134e5a
commit
a04028eede
15 changed files with 135 additions and 10 deletions
|
@ -403,7 +403,9 @@ impl Shaper {
|
|||
// applied. The effect of the property on other word-separator characters is undefined."
|
||||
// We elect to only space the two required code points.
|
||||
if character == ' ' || character == '\u{a0}' {
|
||||
advance = advance + options.word_spacing
|
||||
// https://drafts.csswg.org/css-text-3/#word-spacing-property
|
||||
let (length, percent) = options.word_spacing;
|
||||
advance = (advance + length) + Au((advance.0 as f32 * percent.into_inner()) as i32);
|
||||
}
|
||||
|
||||
advance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue