RE: [svg-developers] Text on arc - rendering position

2011-03-06 Thread honyk
 Not sure if this is what you have in mind, but perhaps experiment with

Hmm, I should clarify my original post (although I appreciate your
interesting experiments).

I just want to clone the first image and rotate it together with text. 
http://skibob.dobruska.cz/other/text_path_ex.svg

It can be easily done via rotating the whole group. No problem.

But I am trying to achieve the same effect just via rendering a path with
transformed control points. But as it can be seen on the right part of the
image, in this case the text is placed inside the hypothetical curve and
there is no way (AFAIK) how to render it otside like in the first image (to
place the bottom of the character nearer to the path).

In my case it is necessary to render a huge amount of text (at any radii and
angle) so I try to find the most efficient way. I think that transformation
of every single instance of text on client side would have a great
performance impact. But up to now it seems to be the only way...

Jan





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Text on arc - rendering position

2011-03-05 Thread honyk
Hello Everyone,

is there any possibility to specify the text rendering position on a path? I
mean to specify if it has to be rendered inside or outside the hypothetical
circle. 

In the attached example I'd like to achieve that text on red arc rendered
outside. Is is possible without any transformations?

Regards,
Jan


[Non-text portions of this message have been removed]





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



RE: [svg-developers] Text on arc - rendering position

2011-03-05 Thread honyk
Just 600 B file has been removed from my message so here is a direct link:
http://skibob.dobruska.cz/other/text_path_ex.svg


Subject: [svg-developers] Text on arc - rendering position

  
Hello Everyone,

is there any possibility to specify the text rendering position on a path? I
mean to specify if it has to be rendered inside or outside the hypothetical
circle. 

In the attached example I'd like to achieve that text on red arc rendered
outside. Is is possible without any transformations?

Regards,
Jan





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [svg-developers] Text on arc - rendering position

2011-03-05 Thread ddailey
Hi Jan,

Not sure if this is what you have in mind, but perhaps experiment with 
something like this:
svg xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink;  
 path id=path0 d=M10 150C65.228 150 110 194.772 110 250C110 305.228 
65.228 350 10 350 stroke=green fill=none/
path id=path31 d=M300 100 A 100 100 1 1 1 300 250 stroke=red 
fill=none stroke-width=3/
   text text-anchor=middle font-size=26textPath xlink:href=#path0 
startOffset=50%Hello/textPath/text
   text text-anchor=top  font-size=26
   textPath xlink:href=#path31 startOffset=8%  kerning=4
   tspan dy=20 -5 5 0 -5Hello/tspan
   /textPath/text
/svg

The first one is your first curve, the second one I used an A subcommand of 
path (just to simplify the code) and then applied a tspan with the dy 
attribute, so as to top-align the text to the curve. This last feature, is 
perhaps desirable or not, but does occur in the wild : 
http://srufaculty.sru.edu/david.dailey/svg/top-align.htm

What I've not been able to figure out, despite considerable experimentation, 
is how to determine the values of dy through script, since the measure of 
glyphs seems unable to inform me (owing to descents and risers and hooks and 
flags and curlicues and all those other funny things that fonts have). The 
above link shows some of the footprints of those investigations. Ultimately, 
I'd like to be able to squash glyphs to fit into curvilinear containers to 
allow SVG to have better textual control, since it seems like SVG ought to 
be the place to do that, rather than having to invent a new spec.

cheers
David

- Original Message - 
From: honyk j.tosov...@email.cz
To: svg-developers@yahoogroups.com
Sent: Saturday, March 05, 2011 4:22 AM
Subject: RE: [svg-developers] Text on arc - rendering position


Just 600 B file has been removed from my message so here is a direct link:
http://skibob.dobruska.cz/other/text_path_ex.svg


Subject: [svg-developers] Text on arc - rendering position


Hello Everyone,

is there any possibility to specify the text rendering position on a path? I
mean to specify if it has to be rendered inside or outside the hypothetical
circle.

In the attached example I'd like to achieve that text on red arc rendered
outside. Is is possible without any transformations?

Regards,
Jan





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links









-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



RE: [svg-developers] Text on arc - rendering position

2011-03-05 Thread John Delacour
At 14:21 +0100 05/03/2011, honyk wrote:

is there any possibility to specify the text rendering position on a path? I
mean to specify if it has to be rendered inside or outside the hypothetical
circle.

In the attached example I'd like to achieve that text on red arc rendered
outside. Is is possible without any transformations?


I see no arcs in your code.  If you define two concentric arcs with a 
difference in radius adapted to the height of your formatted text 
then you can achieve the result you seem to want:



?xml version=1.0 encoding=UTF-8 standalone=no?
!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN
   http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
svg fill=none width=500 height=500 
preserveAspectRatio=xMidYMid meet version=1.1 
xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns:ev=http://www.w3.org/2001/xml-events;
defs
   path id=innerarc d=M 0 0 a 100 100 0 0 0 0 -200 stroke=red /
   path id=outerarc d=M 0 20 a 120 120 0 0 0 0 -240 stroke=red /
/defs

g transform=translate(200 250)
   use xlink:href=#innerarc /
   text style=font-size:20pt;font-family:sans-serif;fill:maroon;
   text-anchor=middle
 textPath xlink:href=#outerarc startOffset=50%
Hello World!
 /textPath
   /text
/g

/svg






-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/