Openstatus www.openstatus.dev

fix: use roboto mono for og image

+7 -57
+7 -57
apps/web/src/app/api/og/route.tsx
··· 2 2 import { ImageResponse } from "next/og"; 3 3 4 4 import { OG_DESCRIPTION, TITLE } from "@/app/shared-metadata"; 5 - import { 6 - SIZE, 7 - calSemiBold, 8 - commitMonoBold, 9 - commitMonoRegular, 10 - interLight, 11 - interMedium, 12 - interRegular, 13 - } from "./utils"; 5 + import { SIZE } from "./utils"; 14 6 15 7 export const runtime = "edge"; 16 8 ··· 18 10 const CATEGORY = "product"; 19 11 20 12 export async function GET(req: Request) { 21 - const [ 22 - interRegularData, 23 - interLightData, 24 - calSemiBoldData, 25 - interMediumData, 26 - commitMonoRegularData, 27 - commitMonoBoldData, 28 - ] = await Promise.all([ 29 - interRegular, 30 - interLight, 31 - calSemiBold, 32 - interMedium, 33 - commitMonoRegular, 34 - commitMonoBold, 35 - ]); 13 + const fontMono = await fetch( 14 + new URL("../../../public/fonts/RobotoMono-Regular.ttf", import.meta.url), 15 + ).then((res) => res.arrayBuffer()); 36 16 37 17 const { searchParams } = new URL(req.url); 38 18 ··· 53 33 <div tw="relative flex flex-col items-start justify-start w-full h-full bg-gray-100"> 54 34 <div 55 35 tw="flex flex-col h-full p-8 w-full" 56 - style={{ fontFamily: "Commit Mono" }} 36 + style={{ fontFamily: "Font Mono" }} 57 37 > 58 38 <div tw="flex flex-col justify-end flex-1 mb-8"> 59 39 <p tw="text-xl text-left">[{category.toLowerCase()}]</p> ··· 77 57 ...SIZE, 78 58 fonts: [ 79 59 { 80 - name: "Inter", 81 - data: interMediumData, 82 - style: "normal", 83 - weight: 500, 84 - }, 85 - { 86 - name: "Inter", 87 - data: interRegularData, 88 - style: "normal", 89 - weight: 400, 90 - }, 91 - { 92 - name: "Inter", 93 - data: interLightData, 94 - style: "normal", 95 - weight: 300, 96 - }, 97 - { 98 - name: "Cal", 99 - data: calSemiBoldData, 100 - style: "normal", 101 - weight: 600, 102 - }, 103 - { 104 - name: "Commit Mono", 105 - data: commitMonoRegularData, 60 + name: "Font Mono", 61 + data: fontMono, 106 62 style: "normal", 107 63 weight: 400, 108 - }, 109 - { 110 - name: "Commit Mono", 111 - data: commitMonoBoldData, 112 - style: "normal", 113 - weight: 700, 114 64 }, 115 65 ], 116 66 },
apps/web/src/public/fonts/RobotoMono-Regular.ttf

This is a binary file and will not be displayed.