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

Intermittent results in /css/css-fonts/variations/at-font-face-font-matching.html #20684

Open
nox opened this issue Apr 24, 2018 · 2 comments · Fixed by #32164
Open

Intermittent results in /css/css-fonts/variations/at-font-face-font-matching.html #20684

nox opened this issue Apr 24, 2018 · 2 comments · Fixed by #32164
Labels
I-intermittent Problem reproduces intermittently.

Comments

@nox
Copy link
Contributor

nox commented Apr 24, 2018

  ▶ Unexpected subtest result in /css/css-fonts/variations/at-font-face-font-matching.html:
  │ FAIL [expected PASS] Matching font-style: 'oblique 20deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'
  │   → assert_true: Unexpected font on test element expected true got false
  │ FAIL [expected PASS] Matching font-style: 'oblique 20deg' should prefer 'oblique 40deg 50deg' over 'oblique 10deg'
  │   → assert_true: Unexpected font on test element expected true got false
  │ FAIL [expected PASS] Matching font-style: 'oblique 20deg' should prefer 'oblique 10deg' over 'italic'
  │   → assert_true: Unexpected font on test element expected true got false
  │ FAIL [expected PASS] Matching font-style: 'oblique 20deg' should prefer 'italic' over 'oblique 0deg'
  │   → assert_true: Unexpected font on test element expected true got false
  │ FAIL [expected PASS] Matching font-style: 'oblique 20deg' should prefer 'oblique 0deg' over 'oblique -50deg -20deg'
  │   → assert_true: Unexpected font on test element expected true got false
  │ FAIL [expected PASS] Matching font-style: 'oblique 20deg' should prefer 'oblique -50deg -20deg' over 'oblique -40deg -30deg'
  │   → assert_true: Unexpected font on test element expected true got false
  │ FAIL [expected PASS] Matching font-style: 'oblique 21deg' should prefer 'oblique 21deg' over 'oblique 30deg 60deg'
  │   → assert_true: Unexpected font on test element expected true got false
  │ FAIL [expected PASS] Matching font-style: 'oblique 21deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'
  │   → assert_true: Unexpected font on test element expected true got false
  │ 
  │ verifyFont@http://web-platform.test:8000/css/css-fonts/variations/at-font-face-font-matching.html:72:13
  └ testDescriptor/</</<@http://web-platform.test:8000/css/css-fonts/variations/at-font-face-font-matching.html:110:33
@nox nox added the I-intermittent Problem reproduces intermittently. label Apr 24, 2018
@mrobinson
Copy link
Member

This is likely flaky because Servo does not support proper matching against font-face attributes (which specify properties or ranges of properties of fonts). I think what is happening instead is that Servo goes into fallback mode which means that the results depend on the order of the fonts in the fallback list which can differ between runs.

I think this is also why the font loads intermittently on http://servo.org.

mrobinson added a commit to mrobinson/servo that referenced this issue Apr 27, 2024
This change adds initial support for the CSS font fallback algorithm
[^1]. 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 added a commit to mrobinson/servo that referenced this issue Apr 27, 2024
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 added a commit to mrobinson/servo that referenced this issue Apr 29, 2024
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 added a commit to mrobinson/servo that referenced this issue Apr 29, 2024
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>
github-merge-queue bot pushed a commit that referenced this issue Apr 29, 2024
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 #20686.
Fixes #20684.

Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
@mrobinson mrobinson reopened this May 2, 2024
@mrobinson
Copy link
Member

Looks like this is now much less flaky, but this will likely still continue to flaky until we fully implement the CSS font matching algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-intermittent Problem reproduces intermittently.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants