[Bugs] #1856 HIGH: long strings don't wrap in SVG output

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Mon May 17 03:48:04 EDT 2010


#1856: long strings don't wrap in SVG output
----------------------------+-----------------------------------------------
    Reporter:  walter       |          Owner:  walter                     
        Type:  defect       |         Status:  new                        
    Priority:  High         |      Milestone:  Unspecified by Release Team
   Component:  Turtleart    |        Version:  Git as of bugdate          
    Severity:  Major        |       Keywords:  sugar-love                 
Distribution:  Unspecified  |   Status_field:  New                        
----------------------------+-----------------------------------------------

Comment(by timclicks):

 From http://www.w3.org/TR/SVG/text.html:



 Each 'text' element causes a single string of text to be rendered. SVG
 performs no automatic line breaking or word wrapping. To achieve the
 effect of multiple lines of text, use one of the following methods:

     * The author or authoring package needs to pre-compute the line breaks
 and use multiple 'text' elements (one for each line of text).
     * The author or authoring package needs to pre-compute the line breaks
 and use a single 'text' element with one or more 'tspan' child elements
 with appropriate values for attributes x, y, dx and dy to set new start
 positions for those characters which start new lines. (This approach
 allows user text selection across multiple lines of text -- see Text
 selection and clipboard operations.)
     * Express the text to be rendered in another XML namespace such as
 XHTML [XHTML] embedded inline within a 'foreignObject' element. (Note: the
 exact semantics of this approach are not completely defined at this time.)

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1856#comment:2>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list