Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fonts: Add support for more @font-face features #32164

Merged
merged 1 commit into from
Apr 29, 2024

Commits on Apr 29, 2024

  1. fonts: Add support for more @font-face features

    There are a couple major changes here:
    
    1. Support is added for the `weight`, `style`, `stretch` and
       `unicode-range` declarations in `@font-face`.
    2. Font matching in the font cache can return templates and
       `FontGroupFamily` can own mulitple templates. This is due to needing
       support for "composite fonts". These are `@font-face` declarations
       that only differ in their `unicode-range` definition.
    
    This fixes a lot of non-determinism in font selection especially when
    dealing with pages that define "composite faces." A notable example of
    such a page is servo.org, which now consistently displays the correct
    web font.
    
    One test starts to fail due to an uncovered bug, but this will be fixed
    in a followup change.
    
    Fixes servo#20686.
    Fixes servo#20684.
    
    Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
    mrobinson and mukilan committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    baf4a9e View commit details
    Browse the repository at this point in the history