Skip to content

Intermittent PASS in /css/css-fonts/font-feature-settings-descriptor-01.html #45418

Open

Description

@Loirooriol

https://github.com/servo/servo/actions/runs/27017661326/job/79738641547

  ▶ PASS [expected FAIL] /css/css-fonts/font-feature-settings-descriptor-01.html

Probably from #45393 @simonwuelker

Activity

  1. simonwuelker commented on Jun 5, 2026

    @simonwuelker
    Member

    @font-face {
    font-family: fwf;
    src: url(support/fonts/FontWithFancyFeatures.otf);
    }
    @font-face {
    font-family: fwf2;
    src: url(support/fonts/FontWithFancyFeatures.otf);
    font-feature-settings: "liga" on, "clig" on, "calt" on, "hlig" on, "dlig" on, "onum" on, "smcp" on, "jp90" on;
    }

    Probably something related to the font cache, where whichever ·@font-face loads first wins. Will investigate later today.

  2. simonwuelker commented on Jun 5, 2026

    @simonwuelker
    Member

    The problem is that both fonts get the same cache entry here:

    let cache_key = FontCacheKey {
    font_identifier: font_template.identifier(),
    font_descriptor: font_descriptor.clone(),
    };
    if let Some(font) = self.fonts.read().get(&cache_key).cloned() {
    return font;
    }
    , so the test always uses either only fwf or only fwf2 (whichever one loads first and is used during the first restyle).

  3. mrobinson commented on Jun 5, 2026

    @mrobinson
    Member

    More investigation is probably necessary to know why this particular template was returned from

    pub fn find_for_descriptor(
    .

    I've seen similar flakes. I think there are two solutions to problems like this:

    • Let the font cache / resolution code have the concept of a defined font that isn't loaded yet. That way the font matcher can match the loading font, but not understand that it shouldn't use another, similar one.
    • Wait to make fonts available until all of the ones that would match together are loaded (a workaround, but maybe easier).

    In addition, maybe FontDescriptors need to be extended with more information to avoid a mismatch in this case.

  4. simonwuelker commented on Jun 5, 2026

    @simonwuelker
    Member

    More investigation is probably necessary to know why this particular template was returned from

    The templates for both fonts are correct (and are correctly selected for their respective text ranges), but when the FontGroupFamilyTemplates try and load their font then the font cache thinks they are the same and gives them the same Font object.

  5. goransh-walia commented on Jun 7, 2026

    @goransh-walia
  6. jdm commented on Jun 7, 2026

    @jdm
    Member

    @goransh-buh Did you mean to comment on another issue? I don't see how your comment is related to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-intermittentProblem reproduces intermittently.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions