liveBook · Manning

@font-face

The CSS @font-face at-rule defines a font resource and descriptors that associate it with a font family and style.

How 4 Manning books explain it

CSS in Depth, Second Edition

The CSS @font-face at-rule defines a downloadable font resource and the descriptors that associate it with a font family and style.

How it is used
Defines downloadable web fonts for page typography and supports deliberate control over family, style, weight, character sets, and loading.
How deep it goes
Explains descriptors, variants, character-range optimization, and loading behavior, while deferring deeper web-font performance treatment.
Examples
Uses Roboto and Sansita definitions, separate light and bold variants, Google Fonts stylesheets, and downloadable WOFF2 resources.
What you can do after
Build custom-font CSS, register local or hosted resources, select matching variants, and manage fallback behavior during loading.

Read how CSS in Depth, Second Edition explains @font-face →

Web Design Playground, Second Edition

The CSS @font-face at-rule defines a font resource and the information a browser needs to load it.

How it is used
Defines web font resources so browsers can load consistent typography instead of depending on visitors’ installed system fonts.
How deep it goes
Explains the rule’s purpose, descriptors, hosting choices, licensing concern, and font formats through short working examples.
Examples
Uses Bree Serif with WOFF2 and WOFF files, and practices a Google Fonts Merriweather setup with a generic fallback.
What you can do after
Apply it via CSS by declaring a hosted font, supplying file formats, and assigning the font to page elements.

Read how Web Design Playground, Second Edition explains @font-face →

Web Design Playground

A CSS at-rule that defines a downloadable font face for use in a document.

How it is used
Positions @font-face as the CSS directive that makes hosted web fonts more predictable than system fonts.
How deep it goes
Shows a declaration template with font-family, src, WOFF2, WOFF, and relative or root URL paths.
Examples
Uses Merriweather through Google Fonts and a two-format self-hosted @font-face rule.
What you can do after
Operate/configure it by naming a font family and pointing src at hosted WOFF2 or WOFF files.

Read how Web Design Playground explains @font-face →

Tiny CSS Projects

@font-face is a CSS at-rule that defines a font resource and its loading and typographic characteristics.

How it is used
Defines imported web fonts and controls their available styles, weights, sources, and loading behavior.
How deep it goes
Explains four descriptors, source fallback, variable weight ranges, font blocking, and stylesheet placement without deeper font internals.
Examples
Demonstrates normal and italic Open Sans using variable and static files, local lookup, WOFF2 sources, and a variable weight range.
What you can do after
Operate/configure custom web fonts with ordered sources, explicit formats, weight declarations, and non-blocking swap behavior.

Read how Tiny CSS Projects explains @font-face →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.