Hi,

Just adding to Dave's answer:

Starting with SVG1.1 and implmented fully in SVG1.2, there is the concept of 
textboxes. However, SVG1.0 does not support this.

Here is the SVG1.2 TR section addressing text flow:
http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html

There are a myriad of examples on the internet of the textbox problem.

Gerally there are two approaches to the problem:
1) Render serverside and adjust font to fit space, then publish to the client. 
This requires a canvas-aware serverside processor such as Batik
2) Send to the client with javascript like David does. This requires 
script-aware browsers and requires clientside resources.

Googling:
http://www.google.com/search?client=opera&rls=en&q=svg+text+flow&sourceid=opera

Ronan


On Wednesday 30 August 2006 01:09, ddailey wrote:
> I think there are those on this list who can readily retrieve nice examples
> of doing this, but let me start with one strategic approach (which may not
> be optimal in all contexts). I think what I've got here works in IE/ASV,
> Firefox and Opera.
>
> Use JavaScript rather than vanilla SVG. I don't think it can be done
> without scripting (though I'd love to find I'm wrong).
>
> 1. Render the text, but somewhere off-screen <text x="-1000" id="Q"...> or
> something
> 2. find the size of its bounding box:
> SVGDocument.getElementById("Q").getBBox
> (Take a peek at
> http://srufaculty.sru.edu/david.dailey/svg/newstuff/text2.svg where this is
> done, though with a bit of extra nonsense which you will have to ignore
> judiciously)
> 3. Adjust either the font-size or the size of the rect to make them both
> happy.
>
> hope this helps,
> David
>
> ----- Original Message -----
> From: "Nazar" <[EMAIL PROTECTED]>
> To: <svg-developers@yahoogroups.com>
> Sent: Tuesday, August 29, 2006 11:00 AM
> Subject: [svg-developers] rect with text incide
>
> > Hello
> > I need to display text which is contained incide a rect.
> > How is it possible using dom.createTextElement make text
> > wrap to occupy rect object space and not cross boundaries?
> >
> >
> >
> >
> >
> >
> >
> > -----
> > 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 unsubscribe send a message to:
> [EMAIL PROTECTED] -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
> membership" ----
> Yahoo! Groups Links
>
>
>

-- 
Ronan Oger
Director
RO IT Systems GmbH
        ...Building Web2.0 with SVG since 2001

http://www.roitsystems.com


-----
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/
 


Reply via email to