This commit is contained in:
ajvpot
2025-09-14 18:25:56 +02:00
parent 3ade624a51
commit e41dfe83d3
2 changed files with 3 additions and 3 deletions

View File

@@ -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,

View File

@@ -41,7 +41,7 @@ export async function GET(req: Request) {
async function generateProfilePicturePNG(backgroundColor: string, label: string): Promise<Buffer> {
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 = `<?xml version="1.0" encoding="UTF-8"?>
@@ -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)}</text>