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(
{/* The OG bundle only ships Latin font subsets; use the romanised spelling here so the name renders instead of tofu boxes. */} Deng Kanglin Qingdao, China
ericwu.me
Hey, I'm {/* The OG bundle ships Latin subsets only and this 156px line was set to exactly four glyphs: keep the length so it can't overflow (the full name appears in the byline above). */} Deng {/* The glass period, resting on the baseline as it does in light mode. */}
An SDE II at AWS building agentic systems and generative UI.
, { ...size, fonts: [ { name: "Fraunces", data: display, weight: 600, style: "normal" }, { name: "Fraunces", data: displayItalic, weight: 600, style: "italic" }, { name: "Figtree", data: text, weight: 400, style: "normal" }, { name: "Figtree", data: textBold, weight: 600, style: "normal" }, ], }, ); }