This commit is contained in:
@@ -76,9 +76,21 @@ function loadFonts() {
|
|||||||
"@fontsource",
|
"@fontsource",
|
||||||
"inter",
|
"inter",
|
||||||
"files",
|
"files",
|
||||||
);
|
const result = spawnSync('resvg', ['-o', outPath, '-'], {
|
||||||
|
input: svg,
|
||||||
|
encoding: null,
|
||||||
|
timeout: 10000 // 10 seconds
|
||||||
|
});
|
||||||
return [
|
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",
|
name: "Inter",
|
||||||
data: readFileSync(join(fontsDir, "inter-latin-400-normal.woff")),
|
data: readFileSync(join(fontsDir, "inter-latin-400-normal.woff")),
|
||||||
weight: 400,
|
weight: 400,
|
||||||
|
|||||||
Reference in New Issue
Block a user