mirror of
https://github.com/ajvpot/meshexplorer.git
synced 2026-03-28 17:42:58 +01:00
stuff
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user