From 4c83f46a50a7a6935062234b19c81426fb1b6f11 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Fri, 26 Jun 2026 00:01:26 +0900 Subject: OGP画像: フォントサイズを大きく調整 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - タイトル: 48px → 52px - 名義(小平市議 安竹洋平): 28px → 36px、ウェイト 600 - ドメイン: 20px → 24px --- src/pages/og/[slug].png.ts | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'src/pages') diff --git a/src/pages/og/[slug].png.ts b/src/pages/og/[slug].png.ts index 52b790b..063c22e 100644 --- a/src/pages/og/[slug].png.ts +++ b/src/pages/og/[slug].png.ts @@ -66,26 +66,46 @@ export async function GET({ params }: { params: { slug: string } }) { { type: "div", props: { - style: { display: "flex", flexDirection: "column", gap: "16px", flex: "1" }, + style: { + display: "flex", + flexDirection: "column", + gap: "16px", + flex: "1", + }, children: [ { type: "div", props: { - style: { fontSize: "48px", fontWeight: "700", lineHeight: "1.3", letterSpacing: "-0.02em" }, + style: { + fontSize: "52px", + fontWeight: "700", + lineHeight: "1.2", + letterSpacing: "-0.02em", + }, children: title, }, }, { type: "div", props: { - style: { fontSize: "28px", fontWeight: "500", opacity: "0.8", color: "#e0e7ff" }, + style: { + fontSize: "36px", + fontWeight: "600", + color: "#e0e7ff", + }, children: "小平市議 安竹洋平", }, }, { type: "div", props: { - style: { fontSize: "20px", fontWeight: "400", opacity: "0.5", color: "#e0e7ff", marginTop: "8px" }, + style: { + fontSize: "24px", + fontWeight: "400", + opacity: "0.6", + color: "#e0e7ff", + marginTop: "4px", + }, children: "yasutakeyohei.com", }, }, @@ -98,8 +118,10 @@ export async function GET({ params }: { params: { slug: string } }) { { width: 1200, height: 630, - fonts: [{ name: "sans-serif", data: fontBuffer, weight: 400, style: "normal" }], - } + fonts: [ + { name: "sans-serif", data: fontBuffer, weight: 400, style: "normal" }, + ], + }, ); const resvg = new Resvg(svg, { fitTo: { mode: "width", value: 1200 } }); -- cgit v1.3.1