Skip to content

Fonts are not applied in resulting PNG #70

Description

@Sashkan

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);
        })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions