xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Faulkner" <chr...@oramap.com>
Subject text-anchor:end not working - WAS text - rtl examples
Date Wed, 29 Oct 2003 17:10:44 GMT

I remembered why I got into trying to get RTL to work in the first place. It
is because "text-anchor:end;" doesn't work for text on a <textPath>. Has
anyone else found this and are there  any workarounds ?

Some sample SVG is given below - it basically has three lines with text
oriented along the lines. YOu can do text along a line with a text-anchor of
start but not end. middle is OK as long as you have a startOffset of 50%. I
have tried putting the style attribute for this in text, tspan and textPath
elements but to no avail.

Help would be very welcome.



<?xml version="1.0" standalone="no"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
<svg width="500" height="500" preserveAspectRatio="xMidYMid meet"
	xmlns="http://www.w3.org/2000/svg" zoomAndPan="magnify"
	viewBox="0 0 200.0 200.0">

<path id="t_316" d="M0,0L90,90" style="stroke:black;"/>
<text style="text-anchor:start;font-size:6;font-family:Verdana;">
<textPath xlink:href="#t_316">
<tspan>Top left heading to middle</tspan></textPath>

<path id="t_311" d="M50,100L100,100L150,100" style="stroke:black;"/>
<textPath xlink:href="#t_311" startOffset="50%">
<tspan style="text-anchor:middle;font-size:6;font-family:Verdana;">aligned
to middle of line</tspan></textPath>

<path id="t_317" d="M110,110L200,200" style="stroke:black;"/>
<text style="text-anchor:end;font-size:6;font-family:Verdana;">
<textPath xlink:href="#t_317">
<tspan text-anchor="end">Middle to bottom right oriented at

<path id="t_318" d="M100,200L200,200" style="stroke:black;"/>
<textPath xlink:href="#t_318" >
<tspan style="text-anchor:end;font-size:6;font-family:Verdana;">Horizontal
oriented at end</tspan></textPath>


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

View raw message