diff --git a/apps/www/src/app/api/og/fonts/Inter-Medium.ttf b/apps/www/src/app/api/og/fonts/Inter-Medium.ttf deleted file mode 100644 index 71d9017..0000000 Binary files a/apps/www/src/app/api/og/fonts/Inter-Medium.ttf and /dev/null differ diff --git a/apps/www/src/app/api/og/fonts/index.ts b/apps/www/src/app/api/og/fonts/index.ts index 5ae18ef..4fed2ae 100644 --- a/apps/www/src/app/api/og/fonts/index.ts +++ b/apps/www/src/app/api/og/fonts/index.ts @@ -4,13 +4,10 @@ export async function loadFonts() { new URL("./Inter-Regular.ttf", import.meta.url) ).then((res) => res.arrayBuffer()); - const interMediumFontP = fetch( - new URL("./Inter-Medium.ttf", import.meta.url) - ).then((res) => res.arrayBuffer()); const interBoldFontP = fetch( new URL("./Inter-Bold.ttf", import.meta.url) ).then((res) => res.arrayBuffer()); - return Promise.all([interRegularFontP, interMediumFontP, interBoldFontP]); + return Promise.all([interRegularFontP, interBoldFontP]); } diff --git a/apps/www/src/app/api/og/server/[id]/players/route.tsx b/apps/www/src/app/api/og/server/[id]/players/route.tsx index b23a5a7..04e1c9c 100644 --- a/apps/www/src/app/api/og/server/[id]/players/route.tsx +++ b/apps/www/src/app/api/og/server/[id]/players/route.tsx @@ -26,7 +26,6 @@ async function loadLocalFonts() { return [ fs.readFileSync(path.join(fontPath, "Inter-Regular.ttf")), - fs.readFileSync(path.join(fontPath, "Inter-Medium.ttf")), fs.readFileSync(path.join(fontPath, "Inter-Bold.ttf")), ]; } @@ -48,7 +47,7 @@ export async function GET( const id = (await params).id; // Load fonts - const [interRegular, interMedium, interBold] = await loadLocalFonts(); + const [interRegular, interBold] = await loadLocalFonts(); // Verify server exists const serverResponse = await fetch(`https://api.minehut.com/server/${id}`); @@ -549,12 +548,6 @@ export async function GET( style: "normal", weight: 700, }, - { - name: "Inter", - data: interMedium, - style: "normal", - weight: 500, - }, ], } ); diff --git a/apps/www/src/app/api/og/server/[id]/route.tsx b/apps/www/src/app/api/og/server/[id]/route.tsx index 104fda1..3f36a5f 100644 --- a/apps/www/src/app/api/og/server/[id]/route.tsx +++ b/apps/www/src/app/api/og/server/[id]/route.tsx @@ -136,7 +136,7 @@ export async function GET( const id = (await params).id; // Load fonts - const [interRegular, interMedium, interBold] = await loadFonts(); + const [interRegular, interBold] = await loadFonts(); // Fetch server data const response = await fetch(`https://api.minehut.com/server/${id}`); @@ -417,18 +417,13 @@ export async function GET( data: interBold, style: "normal", weight: 700, - }, - { - name: "Inter", - data: interMedium, - style: "normal", - weight: 500, - }, + } + ], } ); } catch (error) { - const [interRegular, interMedium, interBold] = await loadFonts(); + const [interRegular, interBold] = await loadFonts(); console.error("Error generating OG image:", error); // Try to load the banner image again in case it failed earlier