I have managed to narrow down this problem. Those of you who know SVG
better than I
will have known all along that the required SVG for this problem is
trivial:
<svg><text>...</text></svg>
I didn't spot that because I was using Inkscape, which adds - amongst
other things - a height
and a width to the <svg> element.
So I can proceed to the next problem, which is that the SVG
serializer for Cocoon renders
the SVG with apparently arbitrary widths, but that's a problem for a
different list.
Steve
---
Vimia GmbH
Postfach 163
8143 Stallikon
044 777 9782
On 4 Jul 2006, at 16:34, winnall wrote:
> I presume this question has been asked before, but I can't find the
> appropriate terms to
> make Google spit out anything helpful. I would be grateful for any
> pointers that could be
> provided.
>
> I generate PNG icons from SVG in Cocoon using Cocoon's SVG2PNG
> serializer. Hitherto I
> have had fixed-sized icons, so it was relatively easy to work from
> templates of known size,
> replacing the text on the fly.
>
> However, I now need to create icons of varying size, depending on
> the length of the text
> that they contain. As I understand it, <text> and <tspan> are used
> to render text in any
> supported format. What I don't understand is how to make the height
> and width of the
> document (viewport?) containing the text the same as the text itself.
>
> I use XSLT to modify my templates. What I would like to be able to
> do is something like the
> following:
>
> 1) replace the text in the template with the text I want;
> 2) check how high and wide the rendered version of the text is;
> 3) set the document height and width according to the values in 3;
> 4) position the text at (0,0);
> 5) convert to PNG.
>
> Steve
>
>
>
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/