// Shared font source of truth for the whole family. One `next/font/google` call // site, exposing the CSS-variable tokens tokens.css's @theme consumes: // --font-display Archivo — the wordmark, headings, headline numerals // --font-sans IBM Plex Sans — body and UI // --font-mono IBM Plex Mono — queries, timestamps, counts, IDs // // Three faces, one voice on every base (plans/brand-and-themes.md, "Type and // radius"). The theme families that each loaded a voice of their own (Source // Serif/Sans/Code, JetBrains Mono) retired with the base × accent themes. // // Each app's root layout imports `fontVars` and puts it on , so the // variables are defined from the root down. // // `next/font` is transformed by Next's SWC loader across the whole compiled // module graph, and `transpilePackages: ["yt-dlp-transcript-common"]` puts this // module in that graph for every app — so a shared call site works. If a build // ever balks, the fallback is to duplicate these calls per layout using the same // variable names; the CSS token contract is the real invariant. import { Archivo, IBM_Plex_Sans, IBM_Plex_Mono } from "next/font/google"; // Archivo carries its WIDTH axis: tokens.css runs `.font-display` at // `font-stretch: 112%`, and the wordmark (common/components/Wordmark) wider // still. Variable weight, so the wordmark's 720 / 380 need no extra files. export const fontDisplay = Archivo({ variable: "--font-display", subsets: ["latin"], axes: ["wdth"], }); // A humanist sans built for long documentation — which is most of what the // archives and the project site are. // // VARIABLE weight (no `weight` list), not the four static weights the UI uses // (400–700). Google Fonts serves Plex Sans from a variable master, and a // request for static weights is cut from it: usually a cached `/s/…` file, but // at times through its dynamic instancer, `https://fonts.gstatic.com/l/font? // kit=…&skey=…&v=v23`. Turbopack's next/font/google cannot carry a font URL // with `&` in it ("next/font/google queries have exactly one entry" → Module // not found), so `next dev` and `next build` failed whenever Google answered // that way (twice on 2026-09-25). The variable file itself is always a // pre-built `/s/…` URL. Same outlines, and one file per style. export const fontSans = IBM_Plex_Sans({ variable: "--font-sans", subsets: ["latin"], style: ["normal", "italic"], }); // Tabular figures for counts, timecodes and recording states. export const fontMono = IBM_Plex_Mono({ variable: "--font-mono", subsets: ["latin"], weight: ["400", "500", "600"], }); // Space-joined `.variable` classes for . export const fontVars = `${fontDisplay.variable} ${fontSans.variable} ${fontMono.variable}`;