1 <svg id=
"svg-root" width=
"100%" height=
"100%"
2 viewBox=
"0 0 480 360" xmlns=
"http://www.w3.org/2000/svg"
3 xmlns:
xlink=
"http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, European Research Consortium for =-->
7 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
8 <!--= All Rights Reserved. =-->
9 <!--= See http://www.w3.org/Consortium/Legal/. =-->
10 <!--======================================================================-->
11 <d:SVGTestCase xmlns:
d=
"http://www.w3.org/2000/02/svg/testsuite/description/"
12 template-version=
"1.4" reviewer=
"CL" author=
"AG" status=
"accepted"
13 version=
"$Revision: 1.11 $" testname=
"$RCSfile: text-tspan-02-b.svg,v $">
14 <d:testDescription xmlns=
"http://www.w3.org/1999/xhtml" href=
"http://www.w3.org/TR/SVG11/text.html#TSpanElementRotateAttribute">
16 Tests the rotate attribute in the tspan element.
20 Tests the case where more characters than rotate values are
21 supplied. In this case the last rotate value should propogate to
22 subsequent characters in the element and child tspan elements that
23 do not contain a rotate value.
26 Tests the case where more values than characters are supplied. In
27 this case each character should be rotated by the designated value
28 remaining unused values propogate to any child tspan elements that
29 do not contain a rotate value.
32 Tests the case where an ansestor of a tspan element specifies a
33 rotate value but the tspan itself doesn't. In this case the tspan
34 should use the current rotate value specified by the ansestor
38 Tests the case where a tspan or text element specifies a rotate
39 value and contains a text string that is broken due to nested child
40 tspan. In this case characters after the child tspan element must
41 be rotated by the current rotate value.
45 <d:operatorScript xmlns=
"http://www.w3.org/1999/xhtml">
47 Run the test. No interaction required.
50 <d:passCriteria xmlns=
"http://www.w3.org/1999/xhtml">
52 For this test to pass the text
"Not all characters in the text have a
53 specified rotation" must be displayed in green without any red showing.
54 If any red shows the test is a fail.
61 The characters in the text
"Not" must be rotated by
5,
15 and
25
65 The first
3 characters in the text
"all characters" must be -
10,-
20
66 and -
30 degrees respectively. Subsequent characters in the text must
67 be each rotated by -
40 degrees.
70 All the characters in the text
"text have a" must be rotated by -
40
74 The characters in the text
"in the" must be rotated by
70,
60,
50,
40,
30
75 and
20 degrees respectively. Note: the space in the text consumes a
79 All the characters in the text
"specified" must be rotated by -
10
83 All the characters in the text
"rotation" must be rotated by
55
89 <title id=
"test-title">$RCSfile: text-tspan-
02-b.svg,v $
</title>
92 font-family=
"SVGFreeSansASCII"
93 unicode-range=
"U+0-7F">
95 <font-face-uri xlink:
href=
"../custom/resources/SVGFreeSans.svg#ascii"/>
99 <g id=
"test-body-content" font-family=
"SVGFreeSansASCII,sans-serif" font-size=
"18">
101 <text font-size=
"35" fill=
"red" x=
"20" y=
"120" rotate=
"5,15,25,35,-10,-20,-30,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,70,60,50,40,30,20,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,55,-10,-10,-10,-10,-10,-10,-10,-10,-10,55,55,55,55,55,55,55,55,55">
102 Not all characters in the
103 <tspan x=
"20" y=
"180">text have a specified rotation
</tspan>
107 <text font-size=
"35" fill=
"green" x=
"20" y=
"120" rotate=
"5,15,25,35,45,55" stroke=
"green" stroke-width=
"0.5">
110 <tspan id=
"child1" rotate=
"-10,-20,-30,-40">
113 <tspan id=
"child2" rotate=
"70,60,50,40,30,20,10">
121 <tspan x=
"20" y=
"180" id=
"child4">
128 <tspan id=
"child5" rotate=
"-10">
135 <text id=
"rotation_values" font-size=
"8" xml:
space=
"preserve">
136 <tspan x=
"30" y=
"135">
139 <tspan x=
"80" y=
"130">
142 <tspan x=
"125" y=
"130">
143 -
40 -
40 -
40 -
40 -
40 -
40 -
40 -
40 -
40 -
40
145 <tspan x=
"295" y=
"145">
148 <tspan x=
"340" y=
"140">
151 <tspan x=
"15" y=
"190">
152 -
40 -
40 -
40 -
40 -
40 -
40 -
40 -
40 -
40
154 <tspan x=
"190" y=
"200">
155 -
10 -
10 -
10 -
10 -
10 -
10 -
10 -
10
157 <tspan x=
"275" y=
"190">
160 <tspan x=
"340" y=
"210">
161 55 55 55 55 55 55 55 55
166 <g font-family=
"SVGFreeSansASCII,sans-serif" font-size=
"32">
167 <text id=
"revision" x=
"10" y=
"340" stroke=
"none"
168 fill=
"black">$Revision:
1.11 $
</text>
170 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000"/>
171 <!-- comment out this watermark once the test is approved --><!--
172 <g id="draft-watermark">
173 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
174 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
175 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>