Commit d5c659a5 authored by Eric Domke's avatar Eric Domke
Browse files

Refactoring while working through W3C tests

- Adding W3C test cases and a test fixture
- Fixed support for CSS stylesheets (particularly when class names are
referenced)
- Refactoring unit calculations so that percentages and fractions
calculate more accurately
- SvgImage:
- Support PreserveAspectRatio attribute
- Support for referencing svg images
- Refactored text rendering to use the AttributeCollection inheritance
scheme
- Initial attempt at 'ex' unit support
- Added support for system color names
- Changed parsing of entities to support XML entities
- Supporting loading of a svg document directly from a XmlDocument with
requiring serializing the document as a string first.
- ...
parent 3aedd8e8
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" viewBox="0 0 450 450" width="450" height="450">
<defs>
<rect id="rect1" width="120" height="120" fill="lime" stroke="lime" onclick="evt.target.correspondingElement.setAttribute('fill', 'red');"/>
</defs>
<g id="rects">
<rect id="rect2" width="450" height="450" fill="lime" stroke="lime" onclick="evt.target.correspondingElement.setAttribute('fill', 'red');"/>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" viewBox="0 0 450 450" width="450" height="450">
<rect x="225" y="0" width="225" height="225" fill="red"/>
<image id="image" x="0" y="225" width="225" height="225" xlink:href="../svg/struct-use-08-b.svg"/>
<use id="use" x="0" y="0" width="225" height="225" xlink:href="../svg/struct-use-08-b.svg#svg-root"/>
<rect x="0" y="225" width="225" height="225" fill="none" stroke="black"/>
</svg>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" >
<OperatorScript version="$Revision: 1.3 $" testname="" >
<Paragraph>
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title" > </title>
<desc id="test-desc" > </desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="testContent" color="ghostwhite" >
<defs>
<linearGradient id="linearGrad1" gradientUnits="objectBoundingBox" y1="0" x1="0" y2="1" x2="1" >
<stop offset="000%" stop-color="orange" />
<stop offset="033%" stop-color="red" />
<stop offset="050%" stop-color="gold" />
<stop offset="066%" stop-color="red" />
<stop offset="100%" stop-color="orange" />
</linearGradient>
<radialGradient id="radialGrad1" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.5" fx="0.15" fy="0.15" >
<stop offset="000%" stop-color="orange" />
<stop offset="033%" stop-color="black" />
<stop offset="050%" stop-color="gold" />
<stop offset="066%" stop-color="black" />
<stop offset="100%" stop-color="orange" />
</radialGradient>
</defs>
<g id="objects1" >
<rect id="rect1" x="001" y="050" width="239" height="125" stroke="none" />
<rect id="rect2" x="240" y="050" width="239" height="125" stroke="none" />
<rect id="rect3" x="001" y="175" width="239" height="125" stroke="none" fill="currentColor" />
<rect id="rect4" x="240" y="175" width="239" height="125" stroke="none" fill="url(#radialGrad1)" />
</g>
</g>
<text font-size="35" x="240" y="35" text-anchor="middle" fill="white" >svgRef1.svg</text>
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.3 $</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
</svg>
rect {fill:fuchsia;}
circle {fill:blue;}
polygon {fill:green;}
ellipse {fill:gold;}
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/css" href="svgRef4.css" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" >
<OperatorScript version="$Revision: 1.2 $" testname="" >
<Paragraph>
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title" > </title>
<desc id="test-desc" > </desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<defs>
<style type="text/css">
<![CDATA[
* {stroke:black; stroke-width:1;}
text {stroke:none;}
#test-frame {fill:none;}
]]>
</style>
</defs>
<g id="testContent" >
<rect id="alpha" x="100" y="50" width="120" height="120" />
<circle id="beta" cx="320" cy="110" r="60" />
<polygon id="gamma" points="260,180 380,190 360,300" />
<ellipse id="delta" cx="160" cy="240" ry="60" rx="45" />
</g>
<text font-size="35" x="240" y="35" text-anchor="middle" >svgRef4.svg</text>
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.2 $</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-alignment-BE-10.svg -->
<!-- renamed for 1.1 suite to text-align-01-f.svg -->
<!-- -->
<!-- Test 'text-anchor' and the 'baseline-shift' properties (horizontal). -->
<!-- -->
<!-- Author : Jon Ferraiolo 06-Aug-2000 -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 06-Aug-2000, JF: Serial#1 created. -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript>
<Paragraph>
Test 'text-anchor' and the 'baseline-shift' properties (horizonatal).
</Paragraph>
<Paragraph>
The topmost three lines test the three values for property 'text-anchor': start, middle and end.
</Paragraph>
<Paragraph>
The next three lines test property 'baseline-shift'.
The fourth line tests 'baseline-shift:7' (i.e., a length for 'baseline-shift').
The red text should shift upward by 7 pixels.
The fifth line tests 'baseline-shift:-70%' (i.e., a percentage for 'baseline-shift').
The red text should shift downward by 70% of the 'font-size'.
The sixth line tests the three keywords 'sub', 'super' and 'normal'.
You should see a subscript, superscript and return to normal.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-align-01-f</title>
<desc id="test-desc">Test 'text-anchor' and the 'baseline-shift' properties (horizontal).</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<text font-family="Helvetica" font-size="14" x="40" y="20">Test 'text-anchor' and the 'baseline-shift' properties (horizontal).</text>
<g id="text-anchor" font-family="Helvetica" font-size="14" >
<g transform="translate(220,70)">
<line stroke="black" x2="50"/>
<circle r="3"/>
<text text-anchor="start" fill="red" >Text-anchor:start</text>
</g>
<g transform="translate(200,100)">
<line stroke="black" x1="-25" x2="25"/>
<circle r="3"/>
<text text-anchor="middle" fill="green" >Text-anchor:middle</text>
</g>
<g transform="translate(200,130)">
<line stroke="black" x1="-50" x2="0"/>
<circle r="3"/>
<text text-anchor="end" fill="blue" >Text-anchor:end</text>
</g>
</g>
<g id="baseline-shift" font-family="Helvetica" font-size="14" transform="translate(100,190)">
<text y="0">Normal text<tspan baseline-shift="7" fill="red" >baseline-shift:7</tspan>normal text</text>
<text y="40">Normal text<tspan baseline-shift="-70%" fill="red" >baseline-shift:-70%</tspan>normal text</text>
<text y="80">Normal text<tspan baseline-shift="sub" fill="red" >sub</tspan><tspan baseline-shift="super" fill="green" >super</tspan><tspan baseline-shift="baseline" fill="blue" >normal</tspan>text</text>
</g>
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-align-01-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-textAnchor-BE-05.svg -->
<!-- renamed for 1.1 suite to text-align-02-f.svg -->
<!-- -->
<!-- Test viewer basic capability to handle 'text-anchor' property. -->
<!-- -->
<!-- Author : Lofton Henderson, 05-aug-2000. -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 05-aug-2000, LH: Serial#1 created. -->
<!-- 23-aug-2000, LH=" add test-body-content 'g'" ser#2 -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript>
<Paragraph>
Test for viewer capibility to handle the basics of the 'textAnchor'
alignment property for 'text' and related elements.
</Paragraph>
<Paragraph>
There are several groups of sub-tests. The first group at the top has an
initial sub-test with no text-anchor property ("none"), then
tests the three values of the text-anchor property -- start, middle, end --
for simple 'text' elements. In each case, the x-coordinate attribute of
the 'text' element corresponds to the position of the vertical red line.
</Paragraph>
<Paragraph>
The second group from the top contains sub-tests to verify that the
interpreter handles text-anchor when the text is comprised of other
text related elements, 'tspan', 'tref', and 'textPath'.
The text-anchor property is present on the containing 'text' element
in these cases, not on the contained child elements.
</Paragraph>
<Paragraph>
The third group from the top contains sub-tests to verify that
the interpreter correctly handles and applies the text-anchor
properties when present on "chunks", which are comprised of tspan elements
with absolute positioning, within the containing 'text' element.
</Paragraph>
<Paragraph>
The rendered picture should match the reference image, except for
possible variations in the text fonts and layout (per CSS2 rules).
</Paragraph>
<Paragraph>
The test also uses the 'rect' element,
as well as basic fill (solid primary colors),
stroke (black 1-pixel lines), font-family (Helvetica)
and font-size properties.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-align-03-f</title>
<desc id="test-desc">Test viewer basic capability to handle 'text-anchor' property.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<defs>
<text id="tref-internal-reference">end. text w/ tref</text>
<path id="myPath" d="M 150 135 375 135"/>
</defs>
<text x="105" y="25" font-family="Helvetica" font-size="14" fill="black" >Basic test of 'text-anchor' alignment property.</text>
<text x="45" y="375" font-size="12" >(The red line corresponds to the "initial current text position".)</text>
<text x="5" y="55" font-family="Helvetica" font-size="14" fill="black" >Simple text.</text>
<!-- Test cases -->
<g font-size="12" fill="blue" >
<line x1="105" y1="60" x2="105" y2="145" stroke="red" />
<text x="105" y="75">none</text>
<text x="105" y="95" text-anchor="start" >start</text>
<text x="105" y="115" text-anchor="middle" >middle</text>
<text x="105" y="135" text-anchor="end" >end</text>
</g>
<!-- Labels -->
<g font-size="10" fill="black" >
<text x="20" y="75">none...</text>
<text x="20" y="95">start...</text>
<text x="20" y="115">middle...</text>
<text x="20" y="135">end...</text>
</g>
<text x="175" y="55" font-family="Helvetica" font-size="14" fill="black" >Tspan, tref, toap</text>
<!-- Test cases -->
<line x1="375" y1="60" x2="375" y2="145" stroke="red" />
<g font-family="Helvetica" font-size="10" fill="blue" >
<text x="375" y="75" text-anchor="start" >start. text w/<tspan xml:space="preserve" fill="red" > red tspan</tspan></text>
<text x="375" y="95" text-anchor="middle" >middle. text w/<tspan font-weight="bold" xml:space="preserve"> bold tspan</tspan></text>
<text x="375" y="115" text-anchor="end" >
<tref xlink:href="#tref-internal-reference"/>
</text>
<text text-anchor="end" >
<textPath text-anchor="end" startOffset="100%" xlink:href="#myPath">Text-anchor: end. Text on path</textPath>
</text>
</g>
<!-- Labels -->
<g font-family="Helvetica" font-size="10" fill="black" >
<text x="190" y="75">tspan...</text>
<text x="190" y="95">tspan...</text>
<text x="190" y="115">tref...</text>
<text x="190" y="135">textPath...</text>
</g>
<text x="5" y="190" font-family="Helvetica" font-size="14" fill="black" >Changes in chunks.</text>
<!-- Test cases -->
<line x1="225" y1="195" x2="225" y2="265" stroke="red" />
<g font-family="Helvetica" font-size="10" fill="blue" >
<text x="225" y="210" text-anchor="end" >Begin with "end" align,<tspan x="225" y="230" xml:space="preserve" text-anchor="middle" > and switch to middle in a tspan, </tspan><tspan x="225" y="250" text-anchor="start" >and finish with start in another tspan.</tspan></text>
</g>
<!-- Labels -->
<g font-family="Helvetica" font-size="10" fill="black" >
<text x="20" y="210">end...</text>
<text x="20" y="230">middle...</text>
<text x="20" y="250">start...</text>
</g>
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-align-02-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-alignment-BE-11.svg -->
<!-- renamed for 1.1 suite to text-align-03-f.svg -->
<!-- -->
<!-- Test 'text-anchor' and the 'baseline-shift' properties (vertical). -->
<!-- -->
<!-- Author : Jon Ferraiolo 06-Aug-2000 -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 06-Aug-2000, JF: Serial#1 created. -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript>
<Paragraph>
Test 'text-anchor' and the 'baseline-shift' properties (vertical).
</Paragraph>
<Paragraph>
The leftmost three lines test the three values for property 'text-anchor': start, middle and end.
</Paragraph>
<Paragraph>
The next three lines test property 'baseline-shift'.
The fourth line tests 'baseline-shift:7' (i.e., a length for 'baseline-shift').
The red text should shift right by 7 pixels.
The fifth line tests 'baseline-shift:-70%' (i.e., a percentage for 'baseline-shift').
The red text should shift left by 70% of the 'font-size'.
The sixth line tests the three keywords 'sub', 'super' and 'normal'.
You should see a subscript, superscript and return to normal.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-align-03-f</title>
<desc id="test-desc">Test 'text-anchor' and the 'baseline-shift' properties (vertical).</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<text font-family="Helvetica" font-size="16" x="10" y="20">Test 'text-anchor' and the 'baseline-shift' properties (vertical).</text>
<text font-family="Helvetica" font-size="16" x="80" y="80">text-anchor</text>
<text font-family="Helvetica" font-size="16" x="335" y="80">baseline-shift</text>
<g writing-mode="tb" glyph-orientation-vertical="0" >
<g id="text-anchor" font-family="Helvetica" font-size="12" transform="translate(80,150)">
<g transform="translate(0,0)">
<circle r="3"/>
<text text-anchor="start" fill="red" >start</text>
</g>
<g transform="translate(50,0)">
<circle r="3"/>
<text text-anchor="middle" fill="green" >middle</text>
</g>
<g transform="translate(100,0)">
<circle r="3"/>
<text text-anchor="end" fill="blue" >end</text>
</g>
</g>
<g id="baseline-shift" font-family="Helvetica" font-size="12" transform="translate(330,95)">
<text x="0">none<tspan baseline-shift="7" fill="red" >shift by 7</tspan>none</text>
<text x="50">none<tspan baseline-shift="-70%" fill="red" >shift by -70%</tspan>none</text>
<text x="100">none<tspan baseline-shift="sub" fill="red" >sub</tspan><tspan baseline-shift="super" fill="green" >super</tspan><tspan baseline-shift="baseline" fill="blue" >no </tspan>shift</text>
</g>
</g>
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-align-03-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-altGlyph-BE-07.svg -->
<!-- renamed for 1.1 suite to text-altglyph-01-f.svg -->
<!-- -->
<!-- Test 'altGlyph' facilities and many-to-many chars to glyphs. -->
<!-- -->
<!-- Author : Jon Ferraiolo 05-Aug-2000 -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 05-Aug-2000, JF: Serial#1 created. -->
<!-- 30-Oct-2000, JF: Fix many, many bugs in test case. -->
<!-- Update baseline names to match new spec. -->
<!-- Update to serial#=2. -->
<!-- 07-Dec-2000, JF: Pretty formatted broke the test by introducing -->
<!-- undesirable white space. I removed the white space. -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript>
<Paragraph>
Test 'altGlyph' facilities and many-to-many chars to glyphs.
</Paragraph>
<Paragraph>
Three text strings show: the word "HAPPY" in red, the word "SAD" in green
and the word "SASSY" in blue.
</Paragraph>
<Paragraph>
The "HAPPY" and "SAD" strings test the 'altGlyph' facility and
the ability to map multiple glyphs to a single character.
All characters except the "D" are bracketed by 'altGlyph' elements
to use two different glyphs to render each character.
For "HAPPY", the horizontal stroke through the center of the characters
is a smile stroke.
For "SAD", the horizontal stroke through the center of the characters
is a frown stroke.
</Paragraph>
<Paragraph>
The "SASSY" string tests a single glyph representing multiple characters
(a ligature). The SVG font in the test case contains an "SS" ligature
so that the "SS" in "SASSY" is rendered with a single glyph, where
the two parts of the "SS" are connected.
</Paragraph>
<Paragraph>
This test requires some support for SVG fonts.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-altglyph-01-f</title>
<desc id="test-desc">Test 'altGlyph' facilities and many-to-many chars to glyphs.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content" stroke-miterlimit="4" >
<text font-family="Helvetica" font-size="14" text-anchor="middle" x="225" y="30">Test 'altGlyph' facilities and many-to-many chars to glyphs</text>
<defs>
<!-- START OF ACTUAL TEST CASE CODE, which is active -->
<font id="Font1" horiz-adv-x="5">
<font-face font-family="HappySad" font-weight="bold" font-style="normal" units-per-em="8" cap-height="8" x-height="4" ascent="8" descent="2" alphabetic="0" mathematical="4" ideographic="-2" hanging="8">
<font-face-src>
<font-face-name name="HappySad"/>
</font-face-src>
</font-face>
<missing-glyph>
<path d="M1,3h2v2h-2z"/>
</missing-glyph>
<glyph id="A1" d="M0,0 L2,8 L4,0 M0,4 C1,3 3,3 4,4"/>
<glyph id="H1" d="M0,0 V8 M4,0 V8 M0,4 C1,3 3,3 4,4"/>
<glyph id="P1" d="M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,3 3,3 4,4"/>
<glyph id="S1" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 C1,3 3,3 4,4"/>
<glyph id="Y1" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,3 3,3 4,4"/>
<glyph id="A2" d="M0,0 L2,8 L4,0 M0,4 C1,5 3,5 4,4"/>
<glyph id="H2" d="M0,0 V8 M4,0 V8 M0,4 C1,5 3,5 4,4"/>
<glyph id="P2" d="M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,5 3,5 4,4"/>
<glyph id="S2" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 C1,5 3,5 4,4"/>
<glyph id="Y2" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,5 3,5 4,4"/>
<glyph id="SS" unicode="SS" horiz-adv-x="6" d=" M0,4 V6 C0,7 0,8 1,8 C2,8 2,7 2,6 M2,4 V2 C2,1 2,0 1,0 C0,0 0,1 0,2 M3,4 V6 C3,7 3,8 4,8 C5,8 5,7 5,6 M5,4 V2 C5,1 5,0 4,0 C3,0 3,1 3,2 M0,4 H5 "/>
<glyph id="A" unicode="A" d="M0,0 L2,8 L4,0 M0,4 H4"/>
<glyph id="D" unicode="D" d="M0,0 V8 C3,8 4,7 4,4 C4,1 3,0 0,0z"/>
<glyph id="S" unicode="S" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 H4"/>
<glyph id="Y" unicode="Y" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 H4"/>
</font>
<altGlyphDef id="Afrown">
<glyphRef xlink:href="#A2"/>
</altGlyphDef>
<altGlyphDef id="Asmile">
<glyphRef xlink:href="#A1"/>
</altGlyphDef>
<altGlyphDef id="Hsmile">
<glyphRef xlink:href="#H1"/>
</altGlyphDef>
<altGlyphDef id="Psmile">
<glyphRef xlink:href="#P1"/>
</altGlyphDef>
<altGlyphDef id="Sfrown">
<glyphRef xlink:href="#S2"/>
</altGlyphDef>
<altGlyphDef id="Ysmile">
<glyphRef xlink:href="#Y1"/>
</altGlyphDef>
<!-- END OF ACTUAL TEST CASE CODE, which is active -->
<!-- START OF PATCH CODE, which is commented out
<path id="Abasepath" d="M0,0 L2,8 L4,0"/>
<path id="Dpath" d="M0,0 V8 C3,8 4,7 4,4 C4,1 3,0 0,0z"/>
<path id="Hbasepath" d="M0,0 V8 M4,0 V8"/>
<path id="Pbasepath" d="M0,0 V8 H2 C3,8 4,7 4,6 V4"/>
<path id="Sbasepath" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6
M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2"/>
<path id="Ybasepath" d="M0,8 V4 M4,8 V4 M2,4 V0"/>
<path id="frownpath" d="M-5,4 C-4,5 -2,5 -1,4"/>
<path id="smilepath" d="M-5,4 C-4,3 -2,3 -1,4"/>
<path id="SSpath" d="
M0,4 V6 C0,7 0,8 1,8 C2,8 2,7 2,6
M2,4 V2 C2,1 2,0 1,0 C0,0 0,1 0,2
M3,4 V6 C3,7 3,8 4,8 C5,8 5,7 5,6
M5,4 V2 C5,1 5,0 4,0 C3,0 3,1 3,2
M0,4 H5
"/>
<path id="Apath" d="M0,0 L2,8 L4,0 M0,4 H4"/>
<path id="Spath" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6
M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 H4"/>
<path id="Ypath" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 H4"/>
END OF PATCH CODE, which is commented out -->
</defs>
<!-- START OF ACTUAL TEST CASE CODE, which is active -->
<g font-family="HappySad" font-size="60" fill="none" stroke-width="5" >
<text x="50" y="120" stroke="red" >
<altGlyph xlink:href="#Hsmile">H</altGlyph>
<altGlyph xlink:href="#Asmile">A</altGlyph>
<altGlyph xlink:href="#Psmile">P</altGlyph>
<altGlyph xlink:href="#Psmile">P</altGlyph>
<altGlyph xlink:href="#Ysmile">Y</altGlyph>
</text>
<text x="50" y="200" stroke="green" ><altGlyph xlink:href="#Sfrown">S</altGlyph><altGlyph xlink:href="#Afrown">A</altGlyph>D</text>
<text x="50" y="280" stroke="blue" >SASSY</text>
</g>
<!-- END OF ACTUAL TEST CASE CODE, which is active. -->
<!-- START OF PATCH CODE, which is commented out
<g fill="none" stroke-width=".5" stroke-miterlimit="1" >
<g transform="translate(100, 150) scale(10) matrix(1 0 0 -1 0 0)"
stroke="red" >
<use x="0" xlink:href="#Hbasepath"/>
<use x="5" xlink:href="#smilepath"/>
<use x="5" xlink:href="#Abasepath"/>
<use x="10" xlink:href="#smilepath"/>
<use x="10" xlink:href="#Pbasepath"/>
<use x="15" xlink:href="#smilepath"/>
<use x="15" xlink:href="#Pbasepath"/>
<use x="20" xlink:href="#smilepath"/>
<use x="20" xlink:href="#Ybasepath"/>
<use x="25" xlink:href="#smilepath"/>
</g>
<g transform="translate(100, 250) scale(10) matrix(1 0 0 -1 0 0)"
stroke="green" >
<use x="0" xlink:href="#Sbasepath"/>
<use x="5" xlink:href="#frownpath"/>
<use x="5" xlink:href="#Abasepath"/>
<use x="10" xlink:href="#frownpath"/>
<use x="10" xlink:href="#Dpath"/>
</g>
<g transform="translate(100, 350) scale(10) matrix(1 0 0 -1 0 0)"
stroke="blue" >
<use x="0" xlink:href="#Spath"/>
<use x="5" xlink:href="#Apath"/>
<use x="10" xlink:href="#SSpath"/>
<use x="16" xlink:href="#Ypath"/>
</g>
</g>
END OF PATCH CODE, which is commented out -->
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-altglyph-01-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!-- ===================================================================== -->
<!-- -->
<!-- text-extTref-BE-18-targ.svg -->
<!-- -->
<!-- Auxiliary file to provide external 'tref' target string for -->
<!-- text-extTref-BE-18.svg. -->
<!-- -->
<!-- ===================================================================== -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="text-tref-BE-04" width="450" height="450" >
<title id="test-title">text-extTref-BE-18-targ</title>
<desc id="test-desc">
Auxiliary ('tref' target) file for test case text-extTref-BE-18.
</desc>
<!-- There is no drawn content to this file, except for the legend & frame -->
<g id="test-body-content">
<defs>
<text id="tref-external-reference">Simple external referenced text.</text>
</defs>
</g>
<!-- ====================================================================== -->
<!-- Legend & frame: Title, suite and SVG document serialization==== -->
<!-- ====================================================================== -->
<g id="test-legend">
<rect x="10" y="390" width="270" height="50" style="fill:none;stroke:#000000"/>
<path style="fill:none;stroke:#000000" d="M10 405 h270 M195 405 v35 M195 422.5 h85"/>
<text style="font-family:Helvetica;font-size:10" x="30" y="401">Scalable Vector Graphics (SVG) Conformance Suite</text>
<text style="font-family:Helvetica;font-size:12" x="65" y="428">text-extTref-BE-18-targ</text>
<text style="font-family:Helvetica;font-size:12" x="205" y="418">Release 1.0</text>
<text style="font-family:Helvetica;font-size:10" x="205" y="435">$Revision: 1.1 $</text>
<!-- Test-framing rectangle, drawn just inside viewport boundary. -->
<rect id="test-frame" x="1" y="1" width="448" height="448" style="fill:none; stroke:#000000"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-i18n-BE-09.svg -->
<!-- renamed for 1.1 suite to text-intro-01-f.svg -->
<!-- -->
<!-- Test various aspects of internationalized text, including -->
<!-- left-to-right, right-to-left, top-to-bottom, and the -->
<!-- following properties: 'writing-mode', -->
<!-- 'glyph-orientation-vertical', 'glyph-orientation-horizontal', -->
<!-- 'direction' and 'unicode-bidi'. -->
<!-- -->
<!-- Author : Jon Ferraiolo 06-Aug-2000 -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 06-Aug-2000, JF: Serial#1 created. -->
<!-- 19-Aug-2000, LH: fix missing </g>. -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase chapter="text" focus="i18n" testType="BE" BENumber="09" >
<OperatorScript>
<Paragraph>
Test various aspects of internationalized text, including
left-to-right, right-to-left, top-to-bottom, and the
following properties: 'writing-mode',
'glyph-orientation-vertical', 'glyph-orientation-horizontal',
'direction' and 'unicode-bidi'.
</Paragraph>
<Paragraph>
Various text strings in various languages appear. The main
purpose of the test is to verify that the correct characters
appear and that they appear in the correct order and orientation.
In particular, ensure that the three lines with Hebrew are ordered
correctly (test of bidi algorithms and support of 'unicode-bidi' and
'direction' properties). Also, ensure that the two lines of
vertical Japanese text have the proper orientation
(test of 'glyph-orientation-vertical' property).
</Paragraph>
<Paragraph>
This test requires installation of a system font that supports
the various international characters used in this test case.
Due to differences across systems regarding system fonts and
font handling, for some implementations editing of the test case
may be necessary to specify the correct system font. To
minimize system dependencies, a future version of this test
might include all necessary glyphs as an SVG font.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-intro-01-f</title>
<desc id="test-desc">Test various aspects of internationalized text, including left-to-right, right-to-left, top-to-bottom, and the following properties: 'writing-mode', 'glyph-orientation-vertical', 'glyph-orientation-horizontal', 'direction' and 'unicode-bidi'.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<text font-family="Helvetica" font-size="12" fill="red" x="10" y="20">Test combinations of left-to-right, right-to-left, top-to-bottom text.</text>
<g font-size="12" font-family="'LucidaSansUnicode','MS-Gothic'" >
<text x="10" y="60">Polish: Mogę jeść szkło, i mi nie szkodzi.</text>
<text x="10" y="80">Russian: Я могу есть стекло, это мне не вредит.</text>
<text x="10" y="100" font-size="11" >Greek: Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα.</text>
<text x="10" y="120">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
<text x="10" y="140">Yiddish: איך קען עסן גלאָז און עס טוט מיר נישט װײ.</text>
</g>
<g font-size="12" font-family="'MS-Gothic','LucidaSansUnicode'" >
<text x="10" y="160">Chinese:我能吞下玻璃而不伤身体。</text>
<text x="10" y="180" font-size="12" >Japanese: 私はガラスを食べられます。それは私を傷つけません。</text>
</g>
<text font-family="Helvetica" font-size="12" fill="red" x="10" y="200">unicode-bidi:bidi-override. First, direction:ltr, then direction:rtl.</text>
<g font-size="12" font-family="'LucidaSansUnicode','MS-Gothic'" >
<text x="10" y="220" unicode-bidi="bidi-override" direction="ltr" >Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
<text x="10" y="240" unicode-bidi="bidi-override" direction="rtl" >Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
</g>
<g font-size="12" font-family="'MS-Gothic','LucidaSansUnicode'" writing-mode="tb" ><text x="390" y="10">This text "我能吞下玻璃而不伤身体。" is in Chinese</text><text x="410" y="10" font-size="10">Japanese: 私はガラスを食べられます。それは私を傷つけません。</text><text x="430" y="10" glyph-orientation-vertical="0" font-size="10" >Japanese: 私はガラスを食べられます。それは私を傷つけません。</text></g>
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-intro-01-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- -->
<!-- text-tref-BE-04.svg -->
<!-- renamed for 1.1 suite to text-tref-01-f.svg -->
<!-- -->
<!-- Test basic capability to handle 'tref' element and attributes. -->
<!-- -->
<!-- -->
<!-- Author : Lofton Henderson, 20-Mar-2000. -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 20-Mar-2000, LH: Serial#1 created. -->
<!-- 24-Apr-2000, LH=" fix bugs in 3rd and 4th tests" serial#2. -->
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
<!-- 24-Oct-2000, LH=" rmv external reference, per f2f" ser#3 -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript>
<Paragraph>
Test for viewer capability to handle the basics of the 'tref' element
and its attributes. Basic referencing is tested, as well as
the equivalence of 'tref' to 'tspan' in attributes handling.
There are five sub-tests.
</Paragraph>
<Paragraph>
The first box down from the top should contain green "Simple internal referenced text.",
which is obtained by a 'tref' element reference to a 'text' element in a 'defs'
section of this test file.
</Paragraph>
<Paragraph>
The second box from the top tests changing of visual properties
of 'tref' substrings. It should contain
the string "Change color within string.", blue except for the single
word "color" in red. Three 'tref' elements within the
'text' element each point to a substring in the 'defs' section of
this test file -- the second 'tref' sets fill color to red and the
others set fill color to blue.
</Paragraph>
<Paragraph>
The third box from the top tests an x-coordinate list in a 'tref',
which individually places each character of the string "Char-by-char."
The string is in a single 'text' element in the 'defs' section.
</Paragraph>
<Paragraph>
The fourth box from the top tests that the x,y attributes of 'tref' behave
like those of 'tspan'. The string
"Bouncing up and down." is formed by four 'tref' elements pointing to 'text'
elements in the 'defs' section, and each 'tref' is individually
positioned by the x,y attributes.
</Paragraph>
<Paragraph>
The final sub-test actually involves the single-line test description at the very
top. It is written initially in blue, and then at the end is over-written in
black by a 'tref' pointing to the 'desc' element of the test.
</Paragraph>
<Paragraph>
The rendered picture should match the reference image, except that some color
"fuzziness" in the top line may result from anti-aliasing.
Also, variations are possible in the text fonts and layout (per CSS2 rules).
</Paragraph>
<Paragraph>
The test also uses the 'rect' element,
as well as basic fill (solid primary colors),
stroke (black 1-pixel lines), font-family (Helvetica)
and font-size properties.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-tref-01-f</title>
<desc id="test-desc">Basic test of 'tref' element and its attributes.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<defs>
<text id="tref-internal-reference">Simple internal referenced text.</text>
<text id="tref-property-change-1">Change</text>
<text id="tref-property-change-2">color</text>
<text id="tref-property-change-3">within string.</text>
<text id="tref-position-change-1">Bouncing</text>
<text id="tref-position-change-2">up</text>
<text id="tref-position-change-3">and</text>
<text id="tref-position-change-4">down.</text>
<text id="tref-coord-list">Char-by-char.</text>
</defs>
<!-- Test case label: this should be overwritten in black by final test. -->
<text x="75" y="25" font-family="Helvetica" font-size="12" fill="blue" >Basic test of 'tref' element and its attributes.</text>
<!-- First sub-test, internal tref reference, within this file -->
<text x="185" y="70" font-size="16" font-family="Helvetica" fill="green" >
<tref xlink:href="#tref-internal-reference"/>
</text>
<rect x="180" y="55" width="230" height="18" fill="none" stroke="black" />
<text x="180" y="85" font-family="Helvetica" font-size="12" fill="black" >'tref', within file</text>
<!-- Second sub-test, tref like tspan, for changing properties -->
<text x="30" y="120" font-size="16" font-family="Helvetica" fill="blue" >
<tref xlink:href="#tref-property-change-1"/>
<tref xlink:href="#tref-property-change-2" fill="red" />
<tref xlink:href="#tref-property-change-3"/>
</text>
<rect x="25" y="105" width="215" height="18" fill="none" stroke="black" />
<text x="25" y="135" font-family="Helvetica" font-size="12" fill="black" >multiple 'tref' and property changes</text>
<!-- Third sub-test, tref like tspan, x,y position list -->
<text font-size="16" font-family="Helvetica" fill="red" >
<tref x="185 200 215 230 245 260 275 290 305 320 335 350 365" y="165" xlink:href="#tref-coord-list"/>
</text>
<rect x="180" y="150" width="230" height="18" fill="none" stroke="black" />
<text x="180" y="180" font-family="Helvetica" font-size="12" fill="black" >'tref' with x-coordinate list</text>
<!-- Fourth sub-test, tref like tspan, changing x,y position -->
<text font-size="16" font-family="Helvetica" fill="blue" >
<tref x="30" y="230" xlink:href="#tref-position-change-1"/>
<tref x="101" y="214" xlink:href="#tref-position-change-2"/>
<tref x="123.5" y="230" xlink:href="#tref-position-change-3"/>
<tref x="154.5" y="246" xlink:href="#tref-position-change-4"/>
</text>
<rect x="25" y="199" width="215" height="56" fill="none" stroke="black" />
<text x="25" y="267" font-family="Helvetica" font-size="12" fill="black" >'tref's with x/y attribute changes</text>
<!-- Final test: overwrite test label in black, by tref to 'desc' element
instead of reference to 'text' element(s) within 'defs'. -->
<text x="75" y="25" font-family="Helvetica" font-size="12" fill="black" >
<tref xlink:href="#test-desc"/>
</text>
<!-- Patch simululation of above...
<text x="75" y="25" font-family="Helvetica" font-size="12" fill="black" >
Basic test of 'tref' element and its attributes.
</text>
-->
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-tref-01-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-whiteSpace-BE-06.svg -->
<!-- renamed for 1.1 suite to text-ws-01-f.svg -->
<!-- -->
<!-- Test that viewer correctly handles whitespace -->
<!-- and the "space" attribute. -->
<!-- -->
<!-- Author : Lofton Henderson, 10-Apr-2000 -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 10-Apr-2000, LH: Serial#1 created. -->
<!-- 02-Jun-2000, LH=" rmv 1 extra SPACE before "indented", test 3" ser#2. -->
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
<!-- 12-Dec-2000, JF: test case 2 lost its linebreaks. restored. -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" >
<OperatorScript>
<Paragraph>
Test for viewer correct handling of whitespace and the 'xml:space' attribute.
There are four sub-tests, two for xml:space value "default" and two for
value "preserve". In each test, the content of the 'text' element is written on
multiple lines. The first test of each pair has indented text with leading
space characters, tabs, etc. The second has no indentation, but a line break
before the content and after it. There are no space (or other whitespace)
characters at the ends of the lines.
</Paragraph>
<Paragraph>
The four test cases are self-descriptive. From the top; first, "default" value applied to
3 lines of content with indents, space characters, tabs, etc; second, "default" applied to two lines content with no indent; third, "preserve" applied to essentially the same content as first; fourth, "preserve" applied to essentially the same content as second.
</Paragraph>
<Paragraph>
In each test, the test string is in blue and the reference
image is in black.
The rendered picture should approximately match the reference image,
however there is some question in the reference image concerning the
exact amount of space in the long-space areas. The third test uses the nbsp unicode character
to force the reference white spaces display, which provides an accurate match if the font in use
has the same metrics for that character and the default white space.
Also, variations are possible in the text fonts and layout (per CSS2 rules).
</Paragraph>
<Paragraph>
The test also uses the 'rect' element,
as well as basic fill (solid primary colors),
stroke (black 1-pixel lines), font-family (Helvetica)
and font-size properties.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-ws-01-f</title>
<desc id="test-desc">Test that viewer correctly handle whitespace and the "space" attribute.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<text x="75" y="20" font-size="10" font-family="Verdana" fill="black">Basic test of xml:space attribute &amp; whitespace handling.</text>
<!-- Test 1: indented, spaces, tabs, and space='default' -->
<!-- Features=" line break and spaces before 1st line" tabs before 2nd line; -->
<!-- spaces before 3rd line; no space at ends of any lines. -->
<text x="25" y="55" fill="blue" font-size="12" font-family="helvetica" xml:space="default">WS example with indented lines.</text>
<text x="25" y="70" fill="black" font-size="12" font-family="helvetica" >WS example with indented lines.</text>
<rect x="25" y="80" width="100" height="12" fill="none" stroke="black" />
<text x="28" y="90" fill="black" font-size="10" font-family="helvetica" >xml:space='default'</text>
<!-- Test 2: non-indented,and space='default' -->
<!-- Features=" line break before 1st line" no space either at beginning -->
<!-- or end of any lines. -->
<text x="25" y="115" fill="blue" font-size="12" font-family="helvetica" xml:space="default">
WS example
non-indented lines.
</text>
<text x="25" y="130" fill="black" font-size="12" font-family="helvetica" >WS examplenon-indented lines.</text>
<rect x="25" y="140" width="100" height="12" fill="none" stroke="black" />
<text x="28" y="150" fill="black" font-size="10" font-family="helvetica" >xml:space='default'</text>
<!-- Test 3: indented, spaces, tabs, and space='preserve' -->
<!-- Features=" line break and spaces before 1st line" tabs before 2nd line; -->
<!-- spaces before 3rd line; no space at ends of any lines. -->
<text x="25" y="175" fill="blue" font-size="12" font-family="helvetica" xml:space="preserve">
WS example
with
indented lines.
</text>
<!-- should match this, with blank replacing HT, LF, etc -->
<text x="25" y="190" fill="black" font-size="12" font-family="helvetica" xml:space='preserve'>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;WS&#160;example&#160;&#160;&#160;&#160;with&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;indented&#160;lines.</text>
<rect x="25" y="200" width="100" height="12" fill="none" stroke="black" />
<text x="28" y="210" fill="black" font-size="10" font-family="helvetica" >xml:space='preserve'</text>
<!-- Test 4: non-indented, and space='preserve' -->
<!-- Features=" no line break before 1st line" no space either at beginning -->
<!-- or end of any lines. -->
<text x="25" y="235" fill="blue" font-size="12" font-family="helvetica" xml:space="preserve">WS example
non-indented lines.
</text>
<text x="25" y="250" fill="black" font-size="12" font-family="helvetica" >WS example non-indented lines.</text>
<rect x="25" y="260" width="100" height="12" fill="none" stroke="black" />
<text x="28" y="270" fill="black" font-size="10" font-family="helvetica" >xml:space='preserve'</text>
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-ws-01-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="450" height="450">
<title>SVG Conformance Tests -- TOC-SV</title>
<style type="text/css">
<!--
text { font-family: helvetica; font-size: 12 }
a > text { fill: blue}
.verdana0 { font-family: Verdana; font-size: 10pt; word-spacing: 0;
text-anchor: start }
.verdana1 { font-family: Verdana; font-size: 10pt; word-spacing: 0;
text-anchor: start; }
-->
</style>
<rect id="test-frame" x="1" y="1" width="448" height="448" style="fill:none; stroke:#000000"/>
<text x="340" y="20" >26 December 2000</text>
<text x="10" y="50" style="font-size:14">SVG Conformance Tests -- TOC (-SV) </text>
<line x1="10" y1="55" x2="440" y2="55" style="stroke:gray"/>
<text x="10" y="85" >Table of Contents</text>
<a xlink:href="./rendering-orderGr-BE-01-nav.svg">
<text x="10" y="105">3. Rendering Model</text>
</a>
<a xlink:href="./structure-empty-BE-01-nav.svg">
<text x="10" y="120">5. Structure</text>
</a>
<a xlink:href="./style-selector-BE-01-nav.svg">
<text x="10" y="135" >6. Styling</text>
</a>
<a xlink:href="./coords-units-BE-01-nav.svg">
<text x="10" y="150">7. Coordinate Systems, Transformations, and Units</text>
</a>
<a xlink:href="./path-lines-BE-01-nav.svg">
<text x="10" y="165" >8. Paths</text>
</a>
<a xlink:href="./shapes-rect-BE-01-nav.svg">
<text x="10" y="180" >9. Basic Shapes</text>
</a>
<a xlink:href="./text-text-BE-01-nav.svg">
<text x="10" y="195" >10. Text</text>
</a>
<a xlink:href="./paint-fill-BE-01-nav.svg">
<text x="10" y="210" >11. Painting: Filling, Stroking, and Markers</text>
</a>
<a xlink:href="./color-datatypes-BE-01-nav.svg">
<text x="10" y="225" >12. Color</text>
</a>
<a xlink:href="./gradPatt-linearGr-BE-01-nav.svg">
<text x="10" y="240" >13. Gradients and Patterns</text>
</a>
<a xlink:href="./masking-clipPath-BE-01-nav.svg">
<text x="10" y="255" >14. Clipping, Masking, Compositing</text>
</a>
<a xlink:href="./filters-many-BE-01-nav.svg">
<text x="10" y="270" >15. Filter Effects</text>
</a>
<a xlink:href="./interact-zoomPan-BE-01-nav.svg">
<text x="10" y="285" >16. Interactivity</text>
</a>
<a xlink:href="./linking-outBound-BE-01-nav.svg">
<text x="10" y="300" >17. Linking</text>
</a>
<a xlink:href="./script-eventDom-BE-01-nav.svg">
<text x="10" y="315" >18. Scripting</text>
</a>
<a xlink:href="./animation-overall-BE-01-nav.svg">
<text x="10" y="330" >19. Animation</text>
</a>
<a xlink:href="./fonts-fontElement-BE-01-nav.svg">
<text x="10" y="345" >20. Fonts</text>
</a>
<a xlink:href="./metadata-sample-BE-01-nav.svg">
<text x="10" y="360" >21. Metadata</text>
</a>
<a xlink:href="./extend-multiNS-BE-01-nav.svg">
<text x="10" y="375" >23. Extensibility</text>
</a>
<a xlink:href="./dom-core-BE-01-nav.svg">
<text x="10" y="390" >B. DOM</text>
</a>
<!-- No related tests yet -->
<text x="10" y="425" style="fill:black; ">F. Implementation requirements</text>
<text x="10" y="440" style="fill:black; ">G. Conformance requirements</text>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="450" height="450">
<title>SVG Conformance Tests -- TOC-SV</title>
<style type="text/css">
<!--
text { font-family: helvetica; font-size: 12 }
a > text { fill: blue}
.verdana0 { font-family: Verdana; font-size: 10pt; word-spacing: 0;
text-anchor: start }
.verdana1 { font-family: Verdana; font-size: 10pt; word-spacing: 0;
text-anchor: start; }
-->
</style>
<rect id="test-frame" x="1" y="1" width="448" height="448" style="fill:none; stroke:#000000"/>
<text x="340" y="20" >26 December 2000</text>
<text x="10" y="50" style="font-size:14">SVG Conformance Tests -- TOC (-SV) </text>
<line x1="10" y1="55" x2="440" y2="55" style="stroke:gray"/>
<text x="10" y="85" >Table of Contents</text>
<a xlink:href="./rendering-orderGr-BE-01-cmpnav.svg">
<text x="10" y="105">3. Rendering Model</text>
</a>
<a xlink:href="./structure-empty-BE-01-cmpnav.svg">
<text x="10" y="120">5. Structure</text>
</a>
<a xlink:href="./style-selector-BE-01-cmpnav.svg">
<text x="10" y="135" >6. Styling</text>
</a>
<a xlink:href="./coords-units-BE-01-cmpnav.svg">
<text x="10" y="150">7. Coordinate Systems, Transformations, and Units</text>
</a>
<a xlink:href="./path-lines-BE-01-cmpnav.svg">
<text x="10" y="165" >8. Paths</text>
</a>
<a xlink:href="./shapes-rect-BE-01-cmpnav.svg">
<text x="10" y="180" >9. Basic Shapes</text>
</a>
<a xlink:href="./text-text-BE-01-cmpnav.svg">
<text x="10" y="195" >10. Text</text>
</a>
<a xlink:href="./paint-fill-BE-01-cmpnav.svg">
<text x="10" y="210" >11. Painting: Filling, Stroking, and Markers</text>
</a>
<a xlink:href="./color-datatypes-BE-01-cmpnav.svg">
<text x="10" y="225" >12. Color</text>
</a>
<a xlink:href="./gradPatt-linearGr-BE-01-cmpnav.svg">
<text x="10" y="240" >13. Gradients and Patterns</text>
</a>
<a xlink:href="./masking-clipPath-BE-01-cmpnav.svg">
<text x="10" y="255" >14. Clipping, Masking, Compositing</text>
</a>
<a xlink:href="./filters-many-BE-01-cmpnav.svg">
<text x="10" y="270" >15. Filter Effects</text>
</a>
<a xlink:href="./interact-zoomPan-BE-01-cmpnav.svg">
<text x="10" y="285" >16. Interactivity</text>
</a>
<a xlink:href="./linking-outBound-BE-01-cmpnav.svg">
<text x="10" y="300" >17. Linking</text>
</a>
<a xlink:href="./script-eventDom-BE-01-cmpnav.svg">
<text x="10" y="315" >18. Scripting</text>
</a>
<a xlink:href="./animation-overall-BE-01-cmpnav.svg">
<text x="10" y="330" >19. Animation</text>
</a>
<a xlink:href="./fonts-fontElement-BE-01-cmpnav.svg">
<text x="10" y="345" >20. Fonts</text>
</a>
<a xlink:href="./metadata-sample-BE-01-cmpnav.svg">
<text x="10" y="360" >21. Metadata</text>
</a>
<a xlink:href="./extend-multiNS-BE-01-cmpnav.svg">
<text x="10" y="375" >23. Extensibility</text>
</a>
<a xlink:href="./dom-core-BE-01-cmpnav.svg">
<text x="10" y="390" >B. DOM</text>
</a>
<!-- No related tests yet -->
<text x="10" y="425" style="fill:black; ">F. Implementation requirements</text>
<text x="10" y="440" style="fill:black; ">G. Conformance requirements</text>
</svg>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment