Get the latest tech news

Creating Perfect Font Fallbacks in CSS


Learn how to use three CSS properties to override font metrics and minimize layout shifts during font load.

Fortunately, modern CSS allows developers to override font metrics with@font-face properties like size-adjust, ascent-override, and descent-override. A@font-face ruleset will typically specify the font family, weight, style, fallback-swapping behavior, and location on the file system. On the web, we typically think of typefaces in terms of their font family, weight, and style, but these are just the superficial characteristics that we can observe on a digital screen.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of css

css

Related news:

News photo

Making a tic-tac-toe game with ‘randomness’ using pure HTML and CSS

News photo

New Magic for Animations in CSS

News photo

Old dogs, new CSS tricks