Hi Mark,

news <[EMAIL PROTECTED]> wrote on 07/15/2006 04:22:02 PM:

> Hi, this is my first post to this group.  I'm using Batik bundled with 
> Cocoon.  I do not really know SVG, so I hope you will pardon my 
> ignorance here... I'm sort of just looking for a formula to do something 

> simple.  This is for a web application with a design that calls for an 
> exotic font for some "header" text above one of the page elements, so 
> I'm using Batik to serialize the text to a PNG image on he server side. 
>   All I need to is to flow some text within a box :-)

   This is actually a bit tricky as it requires generating a dynamically
sized output.  My guess is that your clipping is due to what ever is
rasterizing the SVG having a fixed size (80 pixels high).

   You should be able to use the SVG DOM to query the size of 
the flowRoot element with the 'getBBox' method, 'onload'.

> I can make the box narrower or wider with the expected effects on the 
> line break point.  However, the box always clips just below the top of 
> the second line of text (as shown in the example image), no matter what 
> value I set for the <rect/@height> attribute.

   I suspect the problem is that what ever is rasterizing the text
has specified a fixed height for the output PNG.  Normally this comes
from the height attribute of the <svg> element but as your's doesn't
have anything I'm not sure where width/height information is comming 
from.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to