question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to execute 'check' on 'FontFaceSet': Could not resolve '' as a font.

See original GitHub issue

document.fonts.check() gives of an error for controlled component when value is empty

<DatePicker
    value={date} // date=""
    clearIcon={null}
    onChange={x => handleChange({ target: { name: "date", value: x } })}
/>;

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wojtekmajcommented, Dec 29, 2019

Looks like normal and small-caps are the only allowed values of font-variant in CSS font shorthand property. So, there’s no way to apply font-variant-numeric: tabular-nums on canvas to measure the text. I fixed this issue in update-input-width library in https://github.com/wojtekmaj/update-input-width/commit/ce128a5498e277f9baed8d52dd3d65f71be899ee.

1reaction
DHDanielcommented, Dec 1, 2019

we’re seeing this error:

3.bundle.js:8 Uncaught (in promise) DOMException: Failed to execute 'check' on 'FontFaceSet': Could not resolve 'normal tabular-nums 400 14px / 21px "Helvetica Neue", Helvetica, Arial, sans-serif' as a font.

It seems to be related to the tabular-nums property. Uncommenting it in our styles fixed the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React - How to check if a specific font-face has been loaded?
I have solved my problem in a project with React + Vite doing this: First, install the package npm install use-font-face-observer.
Read more >
FontFaceSet.check() - Web APIs - MDN Web Docs
The check() method of the FontFaceSet returns whether all fonts in the given font list have been loaded and are available.
Read more >
document.fonts.check return 'false' for invalid font names
If no fonts are found, step 3 requires us to *throw an error*. We only get to return true/false if we've found at...
Read more >
Solved: PBI Desktop Visualization Errors
Failed to execute 'check' on 'FontFaceSet': Could not resolve '16px Segoe UI (Bold)' as a font. Error Message: An error occurred while rendering...
Read more >
CSS Font Loading API's FontFaceSet Sample - GitHub Pages
It's used to load font faces, and check the status of previously requested fonts. The FontFaceSet interface for the current HTML page is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found