`font-display` for the Masses | CSS-Tricks

The font-display property is landing in browsers, and this is a great introduction to using it:

If you don’t know which option to use, then go with swap. Not only does it provide an optimal balance between custom fonts and accessibility of content, it provides the same font loading behavior that we’ve relied on JavaScript for. If you have fonts on the page that you’d like to have load, but could ultimately do without, consider going with fallback or optional when using font-display.

Until it’s more widely supported, you can continue to use a JavaScript solution, but even then you can feature detect first:

if ("fontDisplay" in document.body.style === false) {
  /* JavaScript font loading logic goes here. */
}

Tagged with

Related links

The Beatrice Warde Memorial Lecture - St Bride Foundation

Oh, this looks like an excellent event (in London and online):

Adventures in Episodic Type Design

With David Jonathan Ross

Thursday 17th October 2024

Tagged with

Some of the best free fonts | Clearleft

If you start with a high-quality, legible, free typeface and experiment with size, weight, colour, line height, and (subtle) letter spacing, you might find these free options will get you further than you’d think. These are professional fonts crafted and maintained by experts and they can help your content land the way it deserves to.

Tagged with

Marbla

A fun variable font with three axes: inktrap, balloon, and curve.

Tagged with

Monaspace

Five lovely monospaced variable fonts.

Tagged with

Wilco Loft Sans – SimpleBits®

How cool is this‽ Dan made a font for Wilco!

Tagged with

Related posts

Tweaking navigation sizing

Sometimes a consistent interface doesn’t reflect the reality of usage.

The top four web performance challenges

Counting down the charts—what will be in the number one spot?

Understandable excitement

Why I get more excited about new CSS features and JavaScript APIs than I do about new frameworks, libraries, or build tools.

Variable fonts

The future of typography is here.

Billboards and Novels by Jon Tan

Liveblogging Jon’s talk at An Event Apart in Atlanta.