// Dev-only: alternative fonts for the theme switcher. Imported by app/layout.tsx // behind a NODE_ENV check, so none of these ship to production. The current // fonts (Manrope, EB Garamond) are loaded by the layout itself. import { DM_Sans, Fraunces, Geist, IBM_Plex_Sans, Instrument_Serif, Inter, Newsreader, Playfair_Display, } from "next/font/google"; const geist = Geist({ variable: "--font-opt-geist", subsets: ["latin"], preload: false }); const plexSans = IBM_Plex_Sans({ variable: "--font-opt-plex-sans", subsets: ["latin"], weight: ["400", "500", "600", "700"], preload: false, }); const inter = Inter({ variable: "--font-opt-inter", subsets: ["latin"], preload: false }); const dmSans = DM_Sans({ variable: "--font-opt-dm-sans", subsets: ["latin"], preload: false }); const newsreader = Newsreader({ variable: "--font-opt-newsreader", subsets: ["latin"], style: ["normal", "italic"], preload: false, }); const fraunces = Fraunces({ variable: "--font-opt-fraunces", subsets: ["latin"], style: ["normal", "italic"], preload: false, }); const playfair = Playfair_Display({ variable: "--font-opt-playfair", subsets: ["latin"], style: ["normal", "italic"], preload: false, }); const instrument = Instrument_Serif({ variable: "--font-opt-instrument", subsets: ["latin"], weight: "400", style: ["normal", "italic"], preload: false, }); /** Class names that define every alternative font's CSS variable; goes on . */ export const fontVariables = [geist, plexSans, inter, dmSans, newsreader, fraunces, playfair, instrument] .map((f) => f.variable) .join(" "); export type FontOption = { id: string; label: string; variable: string }; export const sansOptions: FontOption[] = [ { id: "manrope", label: "Manrope (current)", variable: "--font-manrope" }, { id: "inter", label: "Inter (previous)", variable: "--font-opt-inter" }, { id: "geist", label: "Geist", variable: "--font-opt-geist" }, { id: "plex-sans", label: "IBM Plex Sans", variable: "--font-opt-plex-sans" }, { id: "dm-sans", label: "DM Sans", variable: "--font-opt-dm-sans" }, ]; export const serifOptions: FontOption[] = [ { id: "garamond", label: "EB Garamond (current)", variable: "--font-garamond" }, { id: "instrument", label: "Instrument Serif (previous)", variable: "--font-opt-instrument" }, { id: "newsreader", label: "Newsreader", variable: "--font-opt-newsreader" }, { id: "fraunces", label: "Fraunces", variable: "--font-opt-fraunces" }, { id: "playfair", label: "Playfair Display", variable: "--font-opt-playfair" }, ];