SVG example does not convert in IM

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

SVG example does not convert in IM

Post by fmw42 »

I am running IM 6.8.9.1 Q16 Mac OSX Snow Leopard with RSVG 2.40.2.

I can drop the following SVG file (textpath.svg) into my browser and it looks fine (text on a path example from http://www.w3.org/TR/SVG11/text.html#TextOnAPath)

Code: Select all

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="12cm" height="3.6cm" viewBox="0 0 1000 300" version="1.1"
     xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <path id="MyPath"
          d="M 100 200 
             C 200 100 300   0 400 100
             C 500 200 600 300 700 200
             C 800 100 900 100 900 100" />
  </defs>
  <desc>Example toap01 - simple text on a path</desc>

  <use xlink:href="#MyPath" fill="none" stroke="red"  />
  <text font-family="Verdana" font-size="42.5" fill="blue" >
    <textPath xlink:href="#MyPath">
      We go up, then we go down, then up again
    </textPath>
  </text>

  <!-- Show outline of canvas using 'rect' element -->
  <rect x="1" y="1" width="998" height="298"
        fill="none" stroke="blue" stroke-width="2" />
</svg>
But when using IM convert, the text does not show, but the path does show.

convert textpath.svg show:
or
convert textpath.svg textpath.png

Can anyone else get this to work in IM using RSVG (or Inkscape)?

P.S I have tried replacing font-family="Verdana" with font /Library/Fonts/verdana.ttf (or arial.ttf), but that fails also. I have both fonts.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: SVG example does not convert in IM

Post by snibgo »

We go up, then we go down, then up again
Ah, that's a familiar phrase. I developed my SVG text page from that.

Pasting your code into an SVG file works fine for me, with standalone Inkscape, or IM with Inkscape as delegate. With RSVG delegate, the text doesn't come out.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: SVG example does not convert in IM

Post by fmw42 »

Thanks snibgo. Looks like I need to get Inkscape.
Post Reply