You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Jim Ley <ji...@jibbering.com> on 2002/08/13 15:38:15 UTC

textLength

Hi.

When I set the textLength of a text element, Squiggle appears to offset
the start of the first character of the group somewhat so it no longers
starts at the location I tell it.

See http://jibbering.com/2002/8/svg-textlength.svg

You'll see that even though the text is set to to start at 100px in each
example it moves to the right depending on the size of the font, what
appears to be happening is that the textLength is constrained but only
after the lead in space of the font has already been added.

Cheers,

Jim.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: textLength

Posted by Jim Ley <ji...@jibbering.com>.
"Thomas E Deweese" <th...@kodak.com>

> JL> See http://jibbering.com/2002/8/svg-textlength.svg
> 
>     Thanks for putting together a good test case.  Can I borrow parts
> of it to add to Batik's test suite?

Of course, feel free.

>     This is now fixed in the current CVS code base.

Excellent, thanks.

Jim.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


textLength

Posted by Thomas E Deweese <th...@kodak.com>.
Hi Jim,

>>>>> "JL" == Jim Ley <ji...@jibbering.com> writes:

JL> When I set the textLength of a text element, Squiggle appears to
JL> offset the start of the first character of the group somewhat so
JL> it no longers starts at the location I tell it.

JL> See http://jibbering.com/2002/8/svg-textlength.svg

    Thanks for putting together a good test case.  Can I borrow parts
of it to add to Batik's test suite?


    This is now fixed in the current CVS code base.

JL> You'll see that even though the text is set to to start at 100px
JL> in each example it moves to the right depending on the size of the
JL> font, what appears to be happening is that the textLength is
JL> constrained but only after the lead in space of the font has
JL> already been added.

    Correct, the first glyphs lead in space wasn't being scaled, it is
now.  This also revealed a complimentary bug in the visual advance
code that caused centered/end anchored text to be slightly off in some
cases (I had noticed it the last time I worked on the code, but I
couldn't track down the source of the bug - fixing your bug made it
'easy' :).

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org