Put in order · Next.js course · Module 2: Routing and Layouts

Font Optimization Pipeline

Arrange the steps of optimizing a font with next/font (from the build to displaying text)

Items to put in order

  • A <link rel="preload"> to the font file is added to the page HTML
  • The browser downloads the font from the same domain as the page
  • Text renders in the target font without a layout shift
  • During the build, Next.js downloads the font file and generates CSS for it
Show the answer

Correct order:

  1. During the build, Next.js downloads the font file and generates CSS for it
  2. A <link rel="preload"> to the font file is added to the page HTML
  3. The browser downloads the font from the same domain as the page
  4. Text renders in the target font without a layout shift