4

I have a nodeJS backend with a service to convert SVG files to PNG. I used to use phantomJS to do that, and never had any problem, but performance was really bad.

I'm looking for a performatic way of doing this. Right now I'm using RSVG, and it works perfectly except for fonts.

Currently we embed our fonts inside SVG file using something like this:

<defs>
    <style type="text/css">
        @font-face {
            font-family: 'BoomBoom';
            src: url('data:application/x-font-ttf;base64,[base-encoded font here]');
        }
    </style>
</defs>

In browsers this works perfectly, but RSVG does not seems to work with embedded base64 fonts.

Does anyone have a suggestion?

  • Did you find a solution for this? – Inc33 Sep 28 '19 at 06:16
  • Does this answer your question? [Including fonts when converting SVG to PNG](https://stackoverflow.com/questions/48105468/including-fonts-when-converting-svg-to-png) – NiRUS May 03 '20 at 18:57

0 Answers0