import { readFile } from "node:fs/promises"; import { join } from "node:path"; import { ImageResponse } from "next/og"; export const alt = "邓康临 - Software Engineer"; export const size = { width: 1200, height: 630 }; export const contentType = "image/png"; // Static cuts of the site's faces (Latin subsets, OFL): Fraunces at the // headline's soft settings (SOFT 100, opsz 144) and Figtree for the text. const font = (file: string) => readFile(join(process.cwd(), "assets/fonts/og", file)); const INK = "#17161b"; const MUTED = "#6c6874"; // The name's glacier-to-ember gradient, mixed in oklab like the site's. const NAME = "#2a86dd 5%, #707ec5 27.5%, #9972ad 50%, #bb6294 72.5%, #d9487a 95%"; /** The hero card as a link preview: headline, glass period, and bio. */ export default async function Image() { const [display, displayItalic, text, textBold] = await Promise.all([ font("fraunces-600-soft.ttf"), font("fraunces-600-soft-italic.ttf"), font("figtree-400.ttf"), font("figtree-600.ttf"), ]); return new ImageResponse(