I'm using this lib to convert an SVG string to a PNG. My SVG includes a google font, which is imported in its style tag.
On the SVG, the font is properly applied. Unfortunately, after using the convert method, it gets back to standard browser font.
Is there anything to add to keep styling in place ?
Here's my piece of code for converting:
// get my SVG
.then((html) => {
return html.toString()
})
.then(htmlString => convert(htmlString))
.then((productText) => {
res.set('Content-Type', 'image/png');
res.send(productText);
})
I'm using this lib to convert an SVG string to a PNG. My SVG includes a google font, which is imported in its
styletag.On the SVG, the font is properly applied. Unfortunately, after using the
convertmethod, it gets back to standard browser font.Is there anything to add to keep styling in place ?
Here's my piece of code for converting: