From fec9628c3896b371104554ce3428ae201a2ab59b Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:05:26 +0200 Subject: [PATCH] debug resvg cli --- lib/og.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/og.js b/lib/og.js index 1dea21f..bc3c165 100644 --- a/lib/og.js +++ b/lib/og.js @@ -75,22 +75,10 @@ function loadFonts() { "node_modules", "@fontsource", "inter", - "files", - const result = spawnSync('resvg', ['-o', outPath, '-'], { - input: svg, - encoding: null, - timeout: 10000 // 10 seconds - }); + "files" + ); return [ { - // Write SVG to temp file for manual debugging - const tmpSvgPath = outPath.replace(/\.png$/, '.svg'); - try { - require('fs').writeFileSync(tmpSvgPath, svg); - console.error(`[og] SVG written to ${tmpSvgPath} for manual testing.`); - } catch (e) { - console.error(`[og] Failed to write SVG for debugging:`, e); - } name: "Inter", data: readFileSync(join(fontsDir, "inter-latin-400-normal.woff")), weight: 400,