How to detect if a font is supported
Written by Stefan Judis
- Published at
- Updated at
- Reading time
- 1min
Jim Nielsen shared how to detect Apple’s “New York” font face, and while reading the post, I realized that I'd forgotten about document
. 🙈
The CSS Font Loading API enables you to access or load fonts via JavaScript. It's good stuff!
And if you want to test if a browser supports a font, the check
method's your friend!
document.fonts.check('12px ui-serif');
If you enjoyed this article...
Join 5.5k readers and learn something new every week with Web Weekly.
Reply to this post and share your thoughts via good old email.