SVG to PNG - can't find even basic fonts

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Posts: 2
Joined: 2012-08-19T22:54:34-07:00
Authentication code: 67789

SVG to PNG - can't find even basic fonts

Post 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="" xmlns: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=""></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.

Post Reply