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
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user