1

For example, I want to put some text on top of a rectangle.

<rect x="0" y="0" width="800" height="600" />
<text x="0" y="0">
    text text text text text text text text text text text text ... so on
</text>

But the problem is that when the text get longer and longer, it will exceed the original width of the rectangle.

In HTML we can use div to wrap the text, in SVG how can we deal with it?

sc1013
  • 1,068
  • 2
  • 16
  • 24

1 Answers1

1

you may want to play with the flow* part of the svg1.2 draft specification.

http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html

For example :

<flowRoot>
<flowRegion>
<rect x="0" y="0" width="800" height="600" />
</flowRegion>
<flowDiv>
<flowPara>text text text text text text text text text text text text ... so on</flowPara>
</flowDiv>
</flowRoot>

Today, it works with inkscape, and with batik as long as the svg version is properly set.

edit: @Robert Longson It may not be standard, but it could save your day (waiting for a decent svg 2.0 implementation), given the fact inkscape and batik are available on both windows and linux, and are able to convert/rasterize from CLI...

yota
  • 2,020
  • 22
  • 37