Page 1 of 1

SVG to PNG - can't find even basic fonts

Posted: 2012-12-10T17:01:44-07:00
by barkingbird
I'm trying to convert some dynamically created SVG's to a bitmap, but no matter what font I pick I end up with Times in the output.

If I run "convert -list type" I get a lot of fonts listed including:

Code: Select all

Path: /usr/lib64/ImageMagick-6.2.8/config/type-windows.xml

Name                             Family                 Style   Stretch   Weight
--------------------------------------------------------------------------------
Arial                            Arial                  Normal  Normal       400
If I take a simple SVG like this:

Code: Select all

<svg style="overflow: hidden; position: relative;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="699" version="1.1" height="476"><image transform="matrix(1,0,0,1,0,0)" preserveAspectRatio="none" x="0" y="0" width="680" height="452" xlink:href="http://dsh.uadev.com.au/fileserver/gallery/290_fullsize.jpg"></image><text transform="matrix(1,0,0,1,0,0)" style="text-anchor: middle; font:Arial; font-size: 20px;font-weight:400" x="297" y="162" text-anchor="middle" font="Arial" stroke="none" fill="#F00" font-size="20px" font-weight="400"><tspan dy="7.26923076923077">1234</tspan></text></svg>
and convert it, I end up with the text being rendered in Times.

I've tried a whole bunch of different fonts including those listed in /usr/lib64/ImageMagick-6.2.8/config/type-ghostscript.xml

If I open the file in Illustrator, it finds them ok.

Any help appreciated on how to get it to find the path to the font.

Regards.