0
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.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-whiteSpace-BE-06.svg -->
|
|
13 |
<!-- renamed for 1.1 suite to text-ws-01-t.svg -->
|
|
14 |
<!-- -->
|
|
15 |
<!-- Test that viewer correctly handles whitespace -->
|
|
16 |
<!-- and the "space" attribute. -->
|
|
17 |
<!-- -->
|
|
18 |
<!-- Author : Lofton Henderson, 10-Apr-2000 -->
|
|
19 |
<!-- 1.1 revision by Vincent Hardy -->
|
|
20 |
<!-- -->
|
|
21 |
<!-- History: -->
|
|
22 |
<!-- 10-Apr-2000, LH: Serial#1 created. -->
|
|
23 |
<!-- 02-Jun-2000, LH=" rmv 1 extra SPACE before "indented", test 3" ser#2. -->
|
|
24 |
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
|
|
25 |
<!-- 12-Dec-2000, JF: test case 2 lost its linebreaks. restored. -->
|
|
26 |
<!-- -->
|
|
27 |
<!-- ===================================================================== -->
|
|
28 |
<!--======================================================================-->
|
|
29 |
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
|
|
30 |
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
|
|
31 |
<!--======================================================================-->
|
|
32 |
<svg version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
|
|
33 |
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" >
|
|
34 |
<!--nav data here-->
|
|
35 |
<OperatorScript version="$Revision: 1.6 $" testname="text-ws-01-f.svg">
|
|
36 |
<Paragraph>
|
|
37 |
Test for viewer correct handling of whitespace and the 'xml:space' attribute.
|
|
38 |
There are two sub-tests, for xml:space value "default".
|
|
39 |
In each test, the content of the 'text' element is written on
|
|
40 |
multiple lines. The first test of each pair has indented text with leading
|
|
41 |
space characters, tabs, etc. The second has no indentation, but a line break
|
|
42 |
before the content and after it. There are no space (or other whitespace)
|
|
43 |
characters at the ends of the lines.
|
|
44 |
</Paragraph>
|
|
45 |
<Paragraph>
|
|
46 |
The two test cases are self-descriptive. From the top;
|
|
47 |
first, "default" value applied to 3 lines of content with indents, space characters, tabs, etc;
|
|
48 |
second, "default" applied to two lines content with no indent;
|
|
49 |
</Paragraph>
|
|
50 |
<Paragraph>
|
|
51 |
In each test, the test string is in blue and the reference
|
|
52 |
image is in black.
|
|
53 |
The rendered picture should approximately match the reference image,
|
|
54 |
however there is some question in the reference image concerning the
|
|
55 |
exact amount of space in the long-space areas. The third test uses the nbsp unicode character
|
|
56 |
to force the reference white spaces display, which provides an accurate match if the font in use
|
|
57 |
has the same metrics for that character and the default white space.
|
|
58 |
Also, variations are possible in the text fonts and layout (per CSS2 rules).
|
|
59 |
</Paragraph>
|
|
60 |
<Paragraph>
|
|
61 |
The test also uses the 'rect' element,
|
|
62 |
as well as basic fill (solid primary colors),
|
|
63 |
stroke (black 1-pixel lines), font-family (Arial)
|
|
64 |
and font-size properties.
|
|
65 |
</Paragraph>
|
|
66 |
</OperatorScript>
|
|
67 |
</SVGTestCase>
|
|
68 |
|
|
69 |
<title id="test-title">text-ws-01-t</title>
|
|
70 |
<desc id="test-desc">Test that viewer correctly handle whitespace and the "space" attribute.</desc>
|
|
71 |
<!--======================================================================-->
|
|
72 |
<!--Content of Test Case follows... =====================-->
|
|
73 |
<!--======================================================================-->
|
|
74 |
<g id="test-body-content">
|
|
75 |
<text x="15" y="35" font-size="32" font-family="Verdana" fill="black">Basic: xml:space attribute</text>
|
|
76 |
<text x="35" y="60" font-size="32" font-family="Verdana" fill="black">& whitespace handling.</text>
|
|
77 |
<!-- Test 1: indented, spaces, tabs, and space='default' -->
|
|
78 |
<!-- Features=" line break and spaces before 1st line" tabs before 2nd line; -->
|
|
79 |
<!-- spaces before 3rd line; no space at ends of any lines. -->
|
|
80 |
<text x="15" y="105" fill="blue" font-size="40" font-family="Arial" xml:space="default">WS with indented lines.</text>
|
|
81 |
<text x="15" y="140" fill="black" font-size="40" font-family="Arial" >WS with indented lines.</text>
|
|
82 |
<rect x="25" y="145" width="350" height="36" fill="none" stroke="black" />
|
|
83 |
<text x="28" y="175" fill="black" font-size="40" font-family="Arial" >xml:space='default'</text>
|
|
84 |
<!-- Test 2: non-indented,and space='default' -->
|
|
85 |
<!-- Features=" line break before 1st line" no space either at beginning -->
|
|
86 |
<!-- or end of any lines. -->
|
|
87 |
<text x="15" y="225" fill="blue" font-size="40" font-family="Arial" xml:space="default">
|
|
88 |
WS
|
|
89 |
non-indented lines.
|
|
90 |
</text>
|
|
91 |
<text x="15" y="260" fill="black" font-size="40" font-family="Arial" >WS non-indented lines.</text>
|
|
92 |
<rect x="25" y="265" width="350" height="36" fill="none" stroke="black" />
|
|
93 |
<text x="28" y="295" fill="black" font-size="40" font-family="Arial" >xml:space='default'</text>
|
|
94 |
</g>
|
|
95 |
|
|
96 |
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.6 $</text>
|
|
97 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
|
|
98 |
</svg>
|
|
99 |
|