From 8556221b089a3497281f07e667fb5832c157a9a2 Mon Sep 17 00:00:00 2001 From: Thomas Faour Date: Thu, 23 Jul 2026 17:56:48 -0400 Subject: [PATCH] Skip font inlining in whiteboard SVG export exportToSvg's font-embedding path (base64 @font-face rules) goes through the browser FontFace API, which jsdom doesn't implement -- that's what crashed fontFacesStylesGenerator after the previous global-shimming fix got past startup. skipInliningFonts avoids that path entirely; resvg already falls back to system fonts for rasterizing regardless, so embedded fonts were never going to affect the final PNG. --- server/render-service/server.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/render-service/server.js b/server/render-service/server.js index dad60a3..366fc8d 100644 --- a/server/render-service/server.js +++ b/server/render-service/server.js @@ -96,6 +96,13 @@ app.post('/render', async (req, res) => { appState: appState || {}, files: files || {}, exportPadding: 20, + // Font embedding (base64 @font-face rules in the SVG's ) goes + // through the browser's FontFace API, which jsdom doesn't implement + // and can't be meaningfully polyfilled here -- and we don't need + // it anyway: resvg (below) already falls back to whatever fonts + // fontconfig finds (see ../Dockerfile's fonts-dejavu-core), so + // embedded fonts were never going to make it into the final PNG. + skipInliningFonts: true, }); // Depending on the installed version, exportToSvg resolves to either // an SVGSVGElement (needs serializing) or already a string -- handle