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.fonts. 🙈

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');
Was this snippet helpful?
Yes? Cool! You might want to check out Web Weekly for more snippets. The last edition went out 12 days ago.
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles