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

fix(api): Chrome respects document.fonts.check() per spec since v 120 #32487

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Feb 29, 2024

Summary

Chrome document.fonts.check should return true for non-existent fonts.

Fixes #32484

Test results and supporting details

Tested on browserstack with the following:

const invalid = document.fonts.check("italic bold 16px Invalid");
const menlo = document.fonts.check("medium Menlo");

console.log(invalid);
console.log(menlo);

console.log(document.fonts.check("12px i-dont-exist"));
// true: the matching font is a nonexistent font

Related issues and PRs

@bsmth bsmth requested a review from a team as a code owner February 29, 2024 16:29
@bsmth bsmth requested review from sideshowbarker and removed request for a team February 29, 2024 16:29
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Feb 29, 2024
Copy link
Contributor

Preview URLs

External URLs (1)

URL: /en-US/docs/Web/API/FontFaceSet/check
Title: FontFaceSet: check() method

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 nice to see this bug getting fixed.

@wbamberg wbamberg merged commit 2ace5a5 into mdn:main Feb 29, 2024
8 checks passed
@bsmth bsmth deleted the 32484-crbug-fonts-check branch March 1, 2024 09:18
@bsmth
Copy link
Member Author

bsmth commented Mar 1, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chrome bug fixed
2 participants