Search the web
Sign In
New User? Sign Up
svg-developers · SVG Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
strange position of tspans   Message List  
Reply | Forward Message #62514 of 63018 |
strange position of tspans


Hello,

i found a strange positioning of tspans in a text element.

<svg:svg xmlns:svg="http://www.w3.org/2000/svg">
<svg:text style="text-anchor:middle;" font-size="35">
<svg:tspan x="100" y="140">PositionBug</svg:tspan> <svg:tspan x="100"
y="155">PositionBug</svg:tspan> <svg:tspan x="100"
y="170">PositionBug</svg:tspan>
</svg:text>
<svg:text style="text-anchor:middle;" font-size="35">
<svg:tspan x="350" y="140">no PositionBug</svg:tspan><svg:tspan x="350"
y="155">no PositionBug</svg:tspan><svg:tspan x="350" y="170">no
PositionBug</svg:tspan>
</svg:text>
</svg:svg>

can you tell me, why all tspan (but not the last one) in a text element
is shifted a few pixel to the left if they are followed by a whitespace?
If there are no whitespace the positioning is done as expected.

Be aware that IE (adobe svg) and webkit consider a line break not as a
white-space in XML, but Opera and Firefox do.

--
best regards
Holger




Mon Jul 6, 2009 8:34 am

holger.jeromin
Offline Offline
Send Email Send Email

Forward
Message #62514 of 63018 |
Expand Messages Author Sort by Date

Hello, i found a strange positioning of tspans in a text element. <svg:svg xmlns:svg="http://www.w3.org/2000/svg"> <svg:text style="text-anchor:middle;"...
Holger Jeromin
holger.jeromin
Offline Send Email
Jul 6, 2009
9:07 am

Hello, i found a strange positioning of tspans in a text element. <svg:svg xmlns:svg="http://www.w3.org/2000/svg"> <svg:text style="text-anchor:middle;"...
Holger Jeromin
holger.jeromin
Offline Send Email
Jul 6, 2009
9:07 am

Hello, i found a strange positioning of tspans in a text element. <svg:svg xmlns:svg="http://www.w3.org/2000/svg"> <svg:text style="text-anchor:middle;"...
Holger Jeromin
holger.jeromin
Offline Send Email
Jul 6, 2009
9:08 am

... The whitespace is within the text element so it is just that i.e a space. You are using text-anchor middle so all the text is stuck together including the...
Robert Longson
longsonr
Offline Send Email
Jul 6, 2009
9:27 pm

... yes, but i position the tspan element absolute, which do not contain a white space itself. Why is the space "sucked in" and why not in the last tspan? -- ...
Holger Jeromin
holger.jeromin
Offline Send Email
Jul 7, 2009
8:22 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help