diff --git a/scripts/lib/discord.ts b/scripts/lib/discord.ts index 4133c55..3e678a5 100644 --- a/scripts/lib/discord.ts +++ b/scripts/lib/discord.ts @@ -179,7 +179,7 @@ export function formatMeshcoreMessageForDiscord( const content = `${text}\n-# _Heard ${heardCount} times by [MeshExplorer](https://map.w0z.is/messages)_`; // Generate profile picture URL using the new API - const profilePictureUrl = `https://map.w0z.is/api/meshcore/profilepicture.png?name=${encodeURIComponent(sender)}&v=2`; + const profilePictureUrl = `https://map.w0z.is/api/meshcore/profilepicture.png?name=${encodeURIComponent(sender)}&v=3`; return { username: sender, diff --git a/src/app/api/meshcore/profilepicture.png/route.ts b/src/app/api/meshcore/profilepicture.png/route.ts index 4f018e2..3399d4b 100644 --- a/src/app/api/meshcore/profilepicture.png/route.ts +++ b/src/app/api/meshcore/profilepicture.png/route.ts @@ -41,7 +41,7 @@ export async function GET(req: Request) { async function generateProfilePicturePNG(backgroundColor: string, label: string): Promise { const size = 512; // Square size - const fontSize = 192; // Font size for the label + const fontSize = 256; // Font size for the label // Create SVG string with properly centered text const svg = ` @@ -52,7 +52,7 @@ async function generateProfilePicturePNG(backgroundColor: string, label: string) y="50%" text-anchor="middle" dominant-baseline="central" - font-family="Noto Sans, Noto Color Emoji, sans-serif" + font-family="Noto Sans, Noto Emoji, sans-serif" font-size="${fontSize}" fill="white" >${escapeXml(label)}