Components
Local font
next/font/local reads a font file relative to the module invoking it. Call at module scope and apply its className or CSS variable. Provide an actual appropriately licensed font file in the project; the example is not executable without it. Source: https://nextjs.org/docs/app/api-reference/components/font. Documentation-reviewed illustrative draft; installed declarations and runtime not verified.
Formal Syntax & Structure
nextjs syntaxnextjs
import localFont from "next/font/local"Working Example
Example Snippetnextjs
import localFont from 'next/font/local';const reading = localFont({src:'./fonts/reading.woff2',display:'swap'});export function ReadingSample(){return <p className={reading.className}>New releases</p>;}