OLD | NEW |
| (Empty) |
1 <?xml version="1.0" encoding="UTF-8"?> | |
2 <!--======================================================================--> | |
3 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =--> | |
4 <!--= Institute of Technology, Institut National de Recherche en =--> | |
5 <!--= Informatique et en Automatique, Keio University). All Rights =--> | |
6 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> | |
7 <!--======================================================================--> | |
8 <!-- =====================================================================--> | |
9 <!-- --> | |
10 <!-- text-text-04-t.svg --> | |
11 <!-- --> | |
12 <!-- Tests that the viewer can handle the rotate attribute on the text --> | |
13 <!-- element. --> | |
14 <!-- --> | |
15 <!-- Author : Vincent Hardy, 06-Jan-2004 --><!D
OCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG
/1.1/DTD/svg11-tiny.dtd"> | |
16 | |
17 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" version="1.1" baseProfile="tiny" id="svg-root" width="100%" height="100%" vie
wBox="0 0 480 360"> | |
18 <SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/descrip
tion/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" owner="VH" d
esc="Tests that the viewer can handle the rotate attribute on the text element"
status="accepted" version="$Revision: 1.13 $" testname="$RCSfile: text-text-04-t
.svg,v $"> | |
19 <OperatorScript> | |
20 <Paragraph> | |
21 The purpose of this test is to validate proper handling of | |
22 the text element's x and y attributes. | |
23 In the various samples, a red marker shows the text's (0,0) | |
24 coordinate. The blue markers show the current text positions. | |
25 These are either defined by absolute x/y positioning or they | |
26 are computed from the embeded font's glyphs advances. | |
27 </Paragraph> | |
28 <Paragraph> | |
29 The first text sample shows a reference piece of text. | |
30 </Paragraph> | |
31 <Paragraph> | |
32 The second text sample (x all) shows a piece of text where | |
33 all the glyphs are positioned along the x axis. | |
34 </Paragraph> | |
35 <Paragraph> | |
36 The third text sample (x more) is a text element where there | |
37 are more x values than characters (5 values for 4 characters). | |
38 The last x value should be ignored and the result should | |
39 be the same as the third sample. | |
40 </Paragraph> | |
41 <Paragraph> | |
42 The fourth text sample (x fewer) is a text element where there | |
43 are fewer x values than characters (3 values for 4 characters). | |
44 The last character should not be positioned but laid out normall
y, | |
45 following its previous character sibling. | |
46 </Paragraph> | |
47 <Paragraph> | |
48 The fifth (y all), sixth (y more) and seventh (y fewer) text sam
ple | |
49 parallel the second, | |
50 third and fourth test, but for the y attribute values. | |
51 </Paragraph> | |
52 <Paragraph> | |
53 The samples in the right column show combinations of x/y | |
54 value sets. | |
55 </Paragraph> | |
56 <Paragraph> | |
57 In all the above tests, blue markers represent the expected glyp
h | |
58 positions. The red markers are showing positions where no glyph | |
59 should appear. The glyphs are black squares of increasing sizes. | |
60 </Paragraph> | |
61 </OperatorScript> | |
62 </SVGTestCase> | |
63 <defs> | |
64 <font id="embeded" horiz-adv-x="224"> | |
65 <font-face font-family="embeded" units-per-em="1000" ascent="1000" descent="-250
" alphabetic="0"/> | |
66 <missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V7
50H100V50H700Z"/> | |
67 <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="750" d="M 0 0
L 250 0 L 250 250 L 0 250 Z"/> | |
68 <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="750" d="M 0 0
L 500 0 L 500 500 L 0 500 Z"/> | |
69 <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0
L 750 0 L 750 750 L 0 750 Z"/> | |
70 <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="750" d="M 0 0
L 1000 0 L 1000 1000 L 0 1000 Z"/> | |
71 </font> | |
72 | |
73 </defs> | |
74 | |
75 <title id="test-title">text-fontSize-01-t.svg</title> | |
76 <desc id="test-desc">Test that viewer has the basic capability to handle dif
ferent font sizes </desc> | |
77 | |
78 <!--======================================================================--
> | |
79 <!--Content of Test Case follows... =====================--
> | |
80 <!--======================================================================--
> | |
81 <g id="test-body-content" font-size="16"> | |
82 <g id="reference" transform="translate(130, 40)"> | |
83 <text text-anchor="end" x="-30">Reference</text> | |
84 <g> | |
85 <use xlink:href="#marker" x="0" fill="#8888FF"/> | |
86 <use xlink:href="#marker" x="15" fill="#8888FF"/>
| |
87 <use xlink:href="#marker" x="30" fill="#8888FF"/>
| |
88 <use xlink:href="#marker" x="45" fill="#8888FF"/>
| |
89 <text id="ref" font-family="embeded" font-size="20">1234
</text> | |
90 </g> | |
91 </g> | |
92 <defs> | |
93 <rect id="marker" x="-4" y="-4" width="8" height="8"/> | |
94 </defs> | |
95 <g id="xAll" transform="translate(130, 80)"> | |
96 <text text-anchor="end" x="-30">x all</text> | |
97 <use xlink:href="#marker" x="0" fill="red"/> | |
98 <use xlink:href="#marker" x="20" fill="#8888FF"/> | |
99 <use xlink:href="#marker" x="40" fill="#8888FF"/> | |
100 <use xlink:href="#marker" x="60" fill="#8888FF"/> | |
101 <use xlink:href="#marker" x="80" fill="#8888FF"/> | |
102 <text font-family="embeded" font-size="20" x="20 40 60 80">1
234</text> | |
103 </g> | |
104 | |
105 <g id="xMore" transform="translate(130, 120)"> | |
106 <text text-anchor="end" x="-30">x more</text> | |
107 <use xlink:href="#marker" x="0" fill="red"/> | |
108 <use xlink:href="#marker" x="20" fill="#8888FF"/> | |
109 <use xlink:href="#marker" x="40" fill="#8888FF"/> | |
110 <use xlink:href="#marker" x="60" fill="#8888FF"/> | |
111 <use xlink:href="#marker" x="80" fill="#8888FF"/> | |
112 <use xlink:href="#marker" x="100" fill="red"/> | |
113 <text font-family="embeded" font-size="20" x="20 40 60 80 10
0">1234</text> | |
114 </g> | |
115 | |
116 <g id="xFewer" transform="translate(130, 160)"> | |
117 <text text-anchor="end" x="-30">x fewer</text> | |
118 <use xlink:href="#marker" x="0" fill="red"/> | |
119 <use xlink:href="#marker" x="20" fill="#8888FF"/> | |
120 <use xlink:href="#marker" x="40" fill="#8888FF"/> | |
121 <use xlink:href="#marker" x="60" fill="#8888FF"/> | |
122 <use xlink:href="#marker" x="75" fill="#8888FF"/> | |
123 <text font-family="embeded" font-size="20" x="20 40 60">1234
</text> | |
124 </g> | |
125 | |
126 <g id="yAll" transform="translate(130, 200)"> | |
127 <text text-anchor="end" x="-30">y all</text> | |
128 <use xlink:href="#marker" x="0" y="-10" fill="#8888FF"/>
| |
129 <use xlink:href="#marker" x="15" y="-5" fill="#8888FF"/>
| |
130 <use xlink:href="#marker" x="30" y="5" fill="#8888FF"/>
| |
131 <use xlink:href="#marker" x="45" y="10" fill="#8888FF"/>
| |
132 <text font-family="embeded" font-size="20" y="-10 -5 5 10">1
234</text> | |
133 </g> | |
134 | |
135 <g id="yMore" transform="translate(130, 250)"> | |
136 <text text-anchor="end" x="-30">y more</text> | |
137 <use xlink:href="#marker" x="0" y="-10" fill="#8888FF"/>
| |
138 <use xlink:href="#marker" x="15" y="-5" fill="#8888FF"/>
| |
139 <use xlink:href="#marker" x="30" y="5" fill="#8888FF"/>
| |
140 <use xlink:href="#marker" x="45" y="10" fill="#8888FF"/>
| |
141 <text font-family="embeded" font-size="20" y="-10 -5 5 10 20
">1234</text> | |
142 </g> | |
143 | |
144 <g id="yFewer" transform="translate(130, 300)"> | |
145 <text text-anchor="end" x="-30">y fewer</text> | |
146 <use xlink:href="#marker" x="0" y="-10" fill="#8888FF"/>
| |
147 <use xlink:href="#marker" x="15" y="-5" fill="#8888FF"/>
| |
148 <use xlink:href="#marker" x="30" y="5" fill="#8888FF"/>
| |
149 <use xlink:href="#marker" x="45" y="5" fill="#8888FF"/>
| |
150 <text font-family="embeded" font-size="20" y="-10 -5 5">1234
</text> | |
151 </g> | |
152 | |
153 <g transform="translate(220, 0)"> | |
154 <g id="xyAll" transform="translate(130, 80)"> | |
155 <text text-anchor="end" x="-30">x/y all</text> | |
156 <use xlink:href="#marker" x="0" fill="red"/> | |
157 <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
| |
158 <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
| |
159 <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
| |
160 <use xlink:href="#marker" x="80" y="10" fill="#8888FF"/>
| |
161 <text font-family="embeded" font-size="20" x="20 40 60 80" y
="-10 -5 5 10">1234</text> | |
162 </g> | |
163 | |
164 <g id="xyMore" transform="translate(130, 120)"> | |
165 <text text-anchor="end" x="-30">x/y more</text> | |
166 <use xlink:href="#marker" x="0" fill="red"/> | |
167 <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
| |
168 <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
| |
169 <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
| |
170 <use xlink:href="#marker" x="80" y="10" fill="#8888FF"/>
| |
171 <use xlink:href="#marker" x="100" y="20" fill="red"/>
| |
172 <text font-family="embeded" font-size="20" x="20 40 60 80 10
0" y="-10 -5 5 10 20">1234</text> | |
173 </g> | |
174 | |
175 <g id="xyFewer" transform="translate(130, 160)"> | |
176 <text text-anchor="end" x="-30">x/y fewer</text> | |
177 <use xlink:href="#marker" x="0" fill="red"/> | |
178 <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
| |
179 <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
| |
180 <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
| |
181 <use xlink:href="#marker" x="75" y="5" fill="#8888FF"/>
| |
182 <text font-family="embeded" font-size="20" x="20 40 60" y="-
10 -5 5">1234</text> | |
183 </g> | |
184 | |
185 <g id="xAllyFewer" transform="translate(130, 200)"> | |
186 <text text-anchor="end" x="-30">x all y fewer</text> | |
187 <use xlink:href="#marker" x="0" fill="red"/> | |
188 <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
| |
189 <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
| |
190 <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
| |
191 <use xlink:href="#marker" x="80" y="5" fill="#8888FF"/>
| |
192 <text font-family="embeded" font-size="20" x="20 40 60 80" y
="-10 -5 5">1234</text> | |
193 </g> | |
194 | |
195 <g id="xFewerYall" transform="translate(130, 240)"> | |
196 <text text-anchor="end" x="-30">x fewer y all</text> | |
197 <use xlink:href="#marker" x="0" fill="red"/> | |
198 <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
| |
199 <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
| |
200 <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
| |
201 <use xlink:href="#marker" x="77.52" y="10" fill="#8888FF"/>
| |
202 <text font-family="embeded" font-size="20" x="20 40 60" y="-
10 -5 5 10">1234</text> | |
203 </g> | |
204 </g> | |
205 </g> | |
206 | |
207 | |
208 <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black"
>$Revision: 1.13 $</text> | |
209 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" strok
e="#000000"/> | |
210 | |
211 <script> | |
212 if (window.testRunner) | |
213 window.testRunner.dumpSelectionRect(); | |
214 document.execCommand("SelectAll"); | |
215 </script> | |
216 </svg> | |
OLD | NEW |