fix: use Nunito font for per-post OG image

This commit is contained in:
2026-08-11 04:17:28 +00:00
parent 9599417d3b
commit 579df08e3a
+4 -3
View File
@@ -27,7 +27,7 @@ export const GET: APIRoute = async ({ props, url }) => {
return new Response(null, { status: 404, statusText: "Not found" }); return new Response(null, { status: 404, statusText: "Not found" });
} }
const fonts = fontData["--font-google-sans-code"]; const fonts = fontData["--font-nunito"];
const regularFontPath = getFontPathByWeight(fonts, 400); const regularFontPath = getFontPathByWeight(fonts, 400);
const boldFontPath = getFontPathByWeight(fonts, 700); const boldFontPath = getFontPathByWeight(fonts, 700);
@@ -55,6 +55,7 @@ export const GET: APIRoute = async ({ props, url }) => {
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "center", justifyContent: "center",
fontFamily: "Nunito",
}, },
children: [ children: [
{ {
@@ -173,13 +174,13 @@ export const GET: APIRoute = async ({ props, url }) => {
embedFont: true, embedFont: true,
fonts: [ fonts: [
{ {
name: "Google Sans Code", name: "Nunito",
data: regularData, data: regularData,
weight: 400, weight: 400,
style: "normal", style: "normal",
}, },
{ {
name: "Google Sans Code", name: "Nunito",
data: boldData, data: boldData,
weight: 700, weight: 700,
style: "normal", style: "normal",