From b01ebe8a16e7b06849ccabf819fc1ce8d5b2fd94 Mon Sep 17 00:00:00 2001 From: Reverdin Agent Date: Sat, 23 May 2026 01:07:21 +0000 Subject: [PATCH] improve(dx): fix OG image font download failure Replace Unicode special chars (crown, sun, infinity, grid) with colored initials using each game accent color. Eliminates the "Failed to load dynamic font" build warning from satori/next-og. --- app/opengraph-image.tsx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/opengraph-image.tsx b/app/opengraph-image.tsx index e8fd776..25ba788 100644 --- a/app/opengraph-image.tsx +++ b/app/opengraph-image.tsx @@ -4,6 +4,14 @@ export const alt = "Puzzle Trainer"; export const size = { width: 1200, height: 630 }; export const contentType = "image/png"; +const GAMES = [ + { label: "Q", color: "#d97706" }, + { label: "T", color: "#ea580c" }, + { label: "Z", color: "#2563eb" }, + { label: "S", color: "#16a34a" }, + { label: "P", color: "#7c3aed" }, +]; + export default function OGImage() { return new ImageResponse( ( @@ -19,39 +27,33 @@ export default function OGImage() { fontFamily: "system-ui, -apple-system, sans-serif", }} > - {/* Game icons row */}
- {["♛", "☀", "∞", "#", "▦"].map((icon, i) => ( + {GAMES.map((g) => (
- {icon} + {g.label}
))}
- - {/* Title */}
Puzzle Trainer
- - {/* Tagline */}
5 puzzles logiques · chaque jour
- - {/* URL */}