import { ImageResponse } from '$lib'; import type { RequestHandler } from './$types'; const template = `

Ready to dive in? Start your free trial today.

Get started
Learn more
`; const fontFile400 = await fetch('https://og-playground.vercel.app/inter-latin-ext-400-normal.woff'); const fontFile700 = await fetch('https://og-playground.vercel.app/inter-latin-ext-700-normal.woff'); const fontData400: ArrayBuffer = await fontFile400.arrayBuffer(); const fontData700: ArrayBuffer = await fontFile700.arrayBuffer(); export const GET: RequestHandler = async () => { return new ImageResponse(template, { height: 250, width: 500, fonts: [ { name: 'Inter Latin', data: fontData400, weight: 400 }, { name: 'Inter Latin', data: fontData700, weight: 700 } ] }); };