mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
layout: Implement word-spacing
per CSS 2.1 § 16.4.
This assumes that there are no ligatures that span across multiple words. Since we have a per-word shape cache, this is a safe assumption as of now. I have left comments to ensure that, if and when this is revisted, we make sure to handle it properly.
This commit is contained in:
parent
ea39b878ac
commit
106fdb1d32
7 changed files with 94 additions and 7 deletions
|
@ -115,6 +115,8 @@ pub struct ShapingOptions {
|
|||
/// Spacing to add between each letter. Corresponds to the CSS 2.1 `letter-spacing` property.
|
||||
/// NB: You will probably want to set the `IGNORE_LIGATURES_SHAPING_FLAG` if this is non-null.
|
||||
pub letter_spacing: Option<Au>,
|
||||
/// Spacing to add between each word. Corresponds to the CSS 2.1 `word-spacing` property.
|
||||
pub word_spacing: Au,
|
||||
/// Various flags.
|
||||
pub flags: ShapingFlags,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue