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

Re: tspan with absolute coordinates inside a textpath

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Wed, 23 Feb 2000 12:07:52 -0800
Message-Id: <200002232005.MAA13601@mail-345.corp.Adobe.COM>
To: Thierry Kormann <Thierry.Kormann@sophia.inria.fr>
Cc: www-svg@w3.org
Thierry,
The current spec isn't clear on this issue. This will be unambiguous before
Proposed Recommendation.

If you supply an absolute coordinate on a 'tspan' (i.e., 'x' or 'y'
attributes) or you use a 'textPath', then you have performed a "jump" on
the current text position. All previous knowledge of the current text
position is dropped. Relative coordinates are adjusted from the most recent
current text position. Thus,

<text>
   <tspan x="10" y="10">First line of text</tspan>
   <tspan x="10" y="20">Second line of text</tspan>
   <tspan dx="30">continuation of text</tspan>
</text>

Will cause the effect of something like this:

   First line of text
   Second line of text    continuation of text

With text on a path, 

<text>
   <textPath ...>Text on a path</textPath>
   <tspan>What happens here?</tspan>
</text>

The string "What happens here?" will be drawn after the word "path", with
its starting position coinciding with the ending position of the "h". The
string "What happens here?" will be oriented however its properties
indicate, which almost surely will be at a rotation angle different than
the "h".

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 03:09 PM 2/22/00 +0100, Thierry Kormann wrote:
>Hi,
>
>Another question about tspan and textpath... in
>the specification, we can read the following example
>that uses relative coordinates with a tspan element
>inside a textpath.
>
>Now, I would like to know what will be the starting point
>of the "then we go down, then up again" if
>I'm using absolute coordinates (using the x and y attributes 
>on tspan) instead of relative ? 
>
>I mean : Does this sentence will still follow the path
>(and using which starting point ?)
>
>
>--- original example for the specification ---
>
><?xml version="1.0" standalone="no"?>
> !DOCTYPE svg PUBLIC "-//W3C//DTD SVG February 2000//EN" 
>     "http://www.w3.org/Graphics/SVG/SVG-20000202.dtd">
> <svg width="10cm" height="3cm" viewBox="0 0 1000 300">
>   <defs>
>       <path id="MyPath"
>                d="M 100 200 
>                C 200 100 300   0 400 100
>                C 500 200 600 300 700 200
>                C 800 100 900 100 900 100" />
>   </defs>
>   <desc>Example toap02 - tspan within textPath</desc>
>
>   <use xlink:href="#MyPath" style="fill:none; stroke:red" />
>   <text style="font-family:Verdana; font-size:42.3333; fill:blue">
>   <textPath xlink:href="#MyPath">
>      We go 
>       <tspan dy="30" style="fill:red">up</tspan>
>       <tspan dy="-30">,</tspan>
>       then we go down, then up again
>    </textPath>
>  </text>
></svg>
>
>---
>
>-- The new SVG document : --
>
><?xml version="1.0" standalone="no"?>
> !DOCTYPE svg PUBLIC "-//W3C//DTD SVG February 2000//EN" 
>     "http://www.w3.org/Graphics/SVG/SVG-20000202.dtd">
> <svg width="10cm" height="3cm" viewBox="0 0 1000 300">
>   <defs>
>       <path id="MyPath"
>                d="M 100 200 
>                C 200 100 300   0 400 100
>                C 500 200 600 300 700 200
>                C 800 100 900 100 900 100" />
>   </defs>
>   <desc>Example toap02 - tspan within textPath</desc>
>
>   <use xlink:href="#MyPath" style="fill:none; stroke:red" />
>   <text style="font-family:Verdana; font-size:42.3333; fill:blue">
>   <textPath xlink:href="#MyPath">
>      We go 
>       <tspan x="10 20" y="30 40" style="fill:red">up</tspan>
>       <tspan dy="-30">,</tspan>
>       then we go down, then up again
>    </textPath>
>  </text>
></svg>
>
>---
>
>Thanks.
>Thierry.
>
>-- 
>Thierry Kormann
>email: Thierry.Kormann@sophia.inria.fr  http://www.inria.fr/koala/tkormann/
>Koala/Dyade/Bull @ INRIA - Sophia Antipolis
> 
Received on Wednesday, 23 February 2000 15:05:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:47 GMT