fix: add liberation fonts to Docker image and configure resvg to use them for label rendering
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s

This commit is contained in:
2026-05-08 09:36:55 +02:00
parent 658c6de74e
commit 2fbbe1142b
2 changed files with 9 additions and 2 deletions
@@ -89,7 +89,14 @@ export class LabelRendererService {
${parts.join('\n ')}
</svg>`;
const resvg = new Resvg(svg, { font: { loadSystemFonts: true } });
const resvg = new Resvg(svg, {
font: {
loadSystemFonts: true,
fontDirs: ['/usr/share/fonts', '/usr/local/share/fonts'],
defaultFontFamily: 'Liberation Sans',
sansSerifFamily: 'Liberation Sans',
},
});
return Buffer.from(resvg.render().asPng());
}
}