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 7 days ago.

Related Topics

Related Articles

About the author

Stefan standing in the park in front of a green background

Frontend nerd with over ten years of experience, "Today I Learned" blogger, conference speaker, Tiny helpers maintainer, and DevRel at Checkly.