OLD | NEW |
| (Empty) |
1 <?xml version="1.0" encoding="UTF-8"?> | |
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics
/SVG/1.1/DTD/svg11-basic.dtd"> | |
3 | |
4 <!--======================================================================--> | |
5 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =--> | |
6 <!--= Institute of Technology, Institut National de Recherche en =--> | |
7 <!--= Informatique et en Automatique, Keio University). All Rights =--> | |
8 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> | |
9 <!--======================================================================--> | |
10 <!-- ===================================================================== --> | |
11 <!-- --> | |
12 <!-- text-tspan-01-b.svg --> | |
13 <!-- --> | |
14 <!-- Test viewer capability to handle the basics of 'tspan'. Derived --> | |
15 <!-- from three examples in 'tspan' spec section. --> | |
16 <!-- --> | |
17 <!-- Author : Lofton Henderson 7-March-2000 (based on spec examples --> | |
18 <!-- by Jon Ferraiolo). --> | |
19 <!-- Revised for 1.1 : Tolga Capin 14-Feb-2002 --> | |
20 <!-- --> | |
21 <!-- History: --> | |
22 <!-- 7-Mar-2000, LH: Serial#1 created. --> | |
23 <!-- 12-Mar-2000, LH, fix test-framing rect; ser#2 --> | |
24 <!-- 19-Mar-2000, LH=" fix missing x-coord in tspan03" Serial#3. --> | |
25 <!-- 21-Mar-2000, LH=" fix wrong 1st coordinate in tspan03" Serial#4 --> | |
26 <!-- 24-Apr-2000, LH=" patch bugs for correct png" Serial#5 --> | |
27 <!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . --> | |
28 <!-- 28-Oct-2000, JF, Change 12pt to 15 user units per working group --> | |
29 <!-- decision that CSS units would only be in tests --> | |
30 <!-- that were testing CSS units. New serial#: 6 --> | |
31 <!-- 08-Dec-2000, JF: Restore white space that got lost somehow. --> | |
32 <!-- --> | |
33 <!-- ===================================================================== --> | |
34 <!--======================================================================--> | |
35 <!--= Note. After October 2000, revision history is kept as CVS 'commit' =--> | |
36 <!--= log messages, and therefore is no longer in the preceding preamble.=--> | |
37 <!--======================================================================--> | |
38 <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:
xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" v
iewBox="0 0 480 360"> | |
39 | |
40 <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/
"> | |
41 <OperatorScript version="$Revision: 1.7 $" testname="text-tspan-
01-b.svg"> | |
42 <Paragraph> | |
43 Test tspan element | |
44 </Paragraph> | |
45 </OperatorScript> | |
46 </SVGTestCase> | |
47 | |
48 <title id="test-title">text-tspan-01-b</title> | |
49 <desc id="test-desc">Test viewer capability to handle the basics of 'tsp
an'.</desc> | |
50 <!--====================================================================
==--> | |
51 <!--Content of Test Case follows... ===================
==--> | |
52 <!--====================================================================
==--> | |
53 <g id="test-body-content"> | |
54 <text x="25" y="20" font-family="Arial" font-size="16" >Basics o
f tspan: changing visual properties and positioning.</text> | |
55 <!-- From example tspan01 - using tspan to change visual attribu
tes --> | |
56 <g id="tspan01" font-family="Arial" font-size="16" > | |
57 <text x="74" y="63.75" fill="blue" >You are<tspan font-w
eight="bold" fill="red"> not </tspan>a banana.</text> | |
58 <rect x="47.5" y="74.25" width="310.5" height="53.5" fil
l="none" stroke="#000000" /> | |
59 <text x="65.25" y="90.75" font-family="Arial" font-size=
"16" >Text: "You are not a banana."</text> | |
60 <text x="65.25" y="108" font-family="Arial" font-size="1
6" >'tspan' changes visual attributes of "not",</text> | |
61 <text x="65.25" y="125.25" font-family="Arial" font-size
="16" >to red, bold.</text> | |
62 </g> | |
63 <!-- From example tspan02 - using tspan's dx and dy attributes | |
64 for incremental positioning adjustments --> | |
65 <g id="tspan02" font-family="Arial" font-size="16" > | |
66 <text x="257.5" y="153.75" fill="blue" >But you<tspan dx
="2em" dy="-10.75" font-weight="bold" fill="red" >are</tspan><tspan dy="25.5" xm
l:space="preserve"> a peach!</tspan></text> | |
67 <rect x="225" y="179" width="245.5" height="53.5" fill="
none" stroke="#000000" /> | |
68 <text x="238" y="195" font-family="Arial" font-size="16"
>Text: "But you are a peach!"</text> | |
69 <text x="238" y="212.25" font-family="Arial" font-size="
16" >Using dx,dy, 'tspan' raises "are",</text> | |
70 <text x="238" y="229.5" font-family="Arial" font-size="1
6" >'tspan' lowers "a peach!"</text> | |
71 </g> | |
72 <!-- Example tspan03 - using tspan's x and y attributes | |
73 for multiline text and precise glyph positioning --> | |
74 <g id="tspan03" fill="#000000" font-family="Arial" font-size="16
" > | |
75 <text fill="rgb(255,164,0)" > | |
76 <tspan x="35 53.75 72.5 91.25 110.5 128.75 147.5
166.25" y="200">Cute and </tspan> | |
77 <tspan x="63.13 81.88 100.63 119.38 138.13" y="2
30.5">fuzzy.</tspan> | |
78 </text> | |
79 <rect x="17.5" y="244.75" width="335.5" height="53.5" fi
ll="none" stroke="#000000" /> | |
80 <text x="25.25" y="258" font-family="Arial" font-size="1
6" >Text: "Cute and fuzzy."</text> | |
81 <text x="25.25" y="275.25" font-family="Arial" font-size
="16" >'tspan' char-by-char placement of "Cute and",</text> | |
82 <text x="25.25" y="292.5" font-family="Arial" font-size=
"16" >'tspan' char-by-char "fuzzy", below it.</text> | |
83 </g> | |
84 </g> | |
85 <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="bl
ack">$Revision: 1.7 $</text> | |
86 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" s
troke="#000000"/> | |
87 <script> | |
88 if (window.testRunner) | |
89 window.testRunner.dumpSelectionRect(); | |
90 document.execCommand("SelectAll"); | |
91 </script> | |
92 </svg> | |
93 | |
OLD | NEW |