Skip to content

Allow Servo to use computed @font-face ranges - #399

Merged
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:stylo-refinement
Jun 23, 2026
Merged

Allow Servo to use computed @font-face ranges#399
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:stylo-refinement

Conversation

@Loirooriol

@Loirooriol Loirooriol commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Performs some changes so that Servo will be able to use these:

  • ComputedFontWeightRange
  • ComputedFontStretchRange
  • ComputedFontStyleDescriptor

Servo PR: servo/servo#45821

Performs some changes so that Servo will be able to use these:
- `ComputedFontWeightRange`
- `ComputedFontStretchRange`
- `ComputedFontStyleDescriptor`

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
@Loirooriol

Copy link
Copy Markdown
Collaborator Author

These changes also affect Gecko, which is being handled upstream:

@Loirooriol
Loirooriol added this pull request to the merge queue Jun 23, 2026
Merged via the queue into servo:main with commit 71bbb70 Jun 23, 2026
5 checks passed
@Loirooriol
Loirooriol deleted the stylo-refinement branch June 23, 2026 16:39
pull Bot pushed a commit to Haofei/servo that referenced this pull request Jun 23, 2026
This changes `CSSFontFaceDescriptors` to use:
- `ComputedFontWeightRange` instead of a pair of `FontWeight`
- `ComputedFontStretchRange` instead of a pair of `FontStretch`
- Stylo's `ComputedFontStyleDescriptor` instead of a similar copy of
that

This way we can simply use the `compute()` method of `FontWeightRange`,
`FontStretchRange` and `FontFaceStyle` to compute the above. The
behavior should be mostly the same, but:
 - Now the ranges will be sorted, if they were in the wrong order
- Degrees in `font-style` will be clamped within the [-90deg, 90deg]
range

Bumps Stylo to servo/stylo#399

Testing: Adding a test for ranges in the wrong order

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Loirooriol added a commit that referenced this pull request Jul 1, 2026
Performs some changes so that Servo will be able to use these:
- `ComputedFontWeightRange`
- `ComputedFontStretchRange`
- `ComputedFontStyleDescriptor`

Servo PR: servo/servo#45821

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Jul 7, 2026
…fox-style-system-reviewers,emilio

Imports servo/stylo#399, with some extra changes.

Differential Revision: https://phabricator.services.mozilla.com/D310930
github-actions Bot pushed a commit to longvatrong111/stylo that referenced this pull request Jul 8, 2026
…fox-style-system-reviewers,emilio

Imports servo#399, with some extra changes.

Differential Revision: https://phabricator.services.mozilla.com/D310930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants