W3C home > Mailing lists > Public > www-svg@w3.org > February 2013

Re: Rendering text on paths - suggestions

From: Erik Dahlstrom <ed@opera.com>
Date: Fri, 22 Feb 2013 14:58:52 +0100
To: www-svg@w3.org
Message-ID: <op.wswugemmgeuyw5@gnorps>
On Fri, 22 Feb 2013 13:25:47 +0100, honyk <j.tosovsky@email.cz> wrote:

> Dear all,
>
> in my apps I frequently render dials (text on circles). I center the text
> (text-anchor: middle) and place it to the certain point on the path.  
> Here is
> the list of suggestions that would help me:
>
> 1. A new flag for not clipping the text outside the path. It is a circle  
> in
> my case and centered text rendering at startOffset = 0/100% is  
> problematic.
> It works only (but not always) for single letter strings. Maybe there is  
> a
> better solution, but now I render this text on an extra circle at 50% and
> rotate it by 180°.

How would you like the overflowing text to be placed in the general case?

> 2. Clarify if it is possible to use negative startOffset values or values
> over 100%. Now I have to do normalization to the proper range (0-100%) as
> some browsers do not accept anything else.

Maybe it could be made even more clear, but any length value is already  
allowed in startOffset. SVG 1.1 First Edition didn't allow negative values  
in startOffset[1], but SVG 1.1 Second Edition allows that[2]. Nowhere does  
it say that values are restricted to the range 0-100%.


[1]  
http://www.w3.org/TR/2003/REC-SVG11-20030114/text.html#TextPathElementStartOffsetAttribute
[2]  
http://www.w3.org/TR/SVG11/text.html#TextPathElementStartOffsetAttribute

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Friday, 22 February 2013 13:59:28 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:54 GMT