Re: tspan

Jon Ferraiolo wrote:

> Shephane,
> I think this is explained in the text layout section, particularly with the
> paragraphs starting with
> http://www.w3.org/TR/SVG/text.html#CurrentTextPosition.
>
> Do you understand what happens with:
>
> <text x="74" y="63.75" style="fill:blue">You are a not a banana</text>
>
> If so, then just think about the intervening <tspan> as changing the color
> of the word "not" without impacting the layout.
>
> <text x="74" y="63.75" style="fill:blue">You are a <tspan
> fill="blue">not</tspan> a banana</text>

ok, my previous message was not clear enough.
After the first example we have:

<text x="187.5" y="183.75" style="fill:blue">But you<tspan dx="2em"
dy="-18.75" style="font-weight:bold; fill:red">are</tspan><tspan dy="37.5"
xml:space="preserve"> a peach!</tspan></text>

Here, "a peach" is vertically aligned with "but you", and horizontally follows
the last
character of "are".

We can see in the third example ("cute and fuzzy") that characters inside a
tspan
may individually have any absolute position.
Imagine that, in the previous example, we set the position of 'e' in "are"
such that the x value of 'e' is lesser than the x value of 'r'. Now where
is "a peach" supposed to go ? right after the 'r' ?

Thanks,

    stef


>
>
> The actual test case puts spaces inside the <tspan>, with
> xml:space="preserve", as follows:
>
> <text x="74" y="63.75" style="fill:blue">You are a<tspan fill="blue"
> xml:space="preserve"> not </tspan>a banana</text>
>
> Jon Ferraiolo
> SVG Editor
> jferraio@adobe.com
>
> At 11:10 AM 2/28/01 +0100, Stephane Conversy wrote:
> >Hello to all.
> >
> >in text-tspan-BE-02.svg
> >
> >we have:
> >
> ><text x="74" y="63.75" style="fill:blue">
> >     You are
> >     <tspan style="font-weight:bold; fill:red" xml:space="preserve"> not
> ></tspan>
> >     a banana.
> ></text>
> >
> >"a banana" is placed on the same base line than "You are" (i.e. same y)
> >and
> >right after " not " (in the "x" sense) , but I couldn't find
> >into the specs the rule for the placement of a PCDATA after a tspan
> >that explain this behavior.
> >
> >Is there someone able to point me ?
> >
> >thanks,
> >
> >     stef
> >
> >
> >--
> >stephane conversy
> >ecole des mines de nantes
> >

--
stephane conversy
ecole des mines de nantes

Received on Thursday, 1 March 2001 03:19:57 UTC