Commit 535abaf8 authored by Tebjan Halm's avatar Tebjan Halm
Browse files

Merge pull request #90 from erdomke/master

Initial Work on W3C Test Compliance
parents 4b1ff3d4 bd05ecbc
<?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/svg11.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/. =-->
<!-- =====================================================================-->
<!-- =====================================================================-->
<!-- -->
<!-- struct-frag-01.svg -->
<!-- Test that 'svg' document fragments embedded
within other 'svg' document fragments will render correctly -->
<!-- -->
<!-- Author : Volodymyr Katrushenko, BitFlash Inc., 2002 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="160" height="120">
<title id="test-title">struct-frag-01</title>
<desc id="test-desc">Test that 'svg' elements nested inside of each other will render correctly</desc>
<!--Content of Test Case follows...=======================================-->
<g id="test-body-content">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="lowerRight" x="80" y="40" width="79" height="39">
<rect x="0" y="0" width="79" height="39" fill="red" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="upperRight" x="1" y="1" width="79" height="39">
<rect fill="blue" x="0" y="0" width="79" height="39"/>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="childArea" x="20" y="10" width="40" height="20">
<rect fill="yellow" x="0" y="0" width="40" height="20"/>
</svg>
</svg>
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<rect id="slideframe" fill="none" stroke="#000000" stroke-width="1" x="1" y="1" width="158" height="118"/>
<g id="test-legend" fill="black" font-size="10" >
<rect x="3" y="81" width="154" height="36" fill="none" stroke="#000000" />
<rect x="3" y="93" width="154" height="12" fill="none" stroke="#000000" />
<rect x="66" y="105" width="52" height="12" fill="none" stroke="#000000" />
<text x="8" y="91">SVG v1.1 Conformance Suite</text>
<text x="8" y="103">struct-frag-01-B</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="8" y="115" fill="blue">&#169;2002 W3C</text>
</a>
<text x="70" y="115">$Rev:1.0$</text>
<text x="122" y="115">Rel 1.1</text>
</g>
</svg>
\ No newline at end of file
<?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">
<g id="rects">
<rect width="450" height="450" fill="blue" onclick="evt.currentTarget.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">
<g id="rects">
<rect width="450" height="450" style="fill:#00f" onclick="evt.currentTarget.setAttribute('style', '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">
<g id="drawRects">
<rect x="225" y="0" width="225" height="225" fill="red"/>
<image x="0" y="225" width="225" height="225" xlink:href="../svg/struct-image-12-b.svg"/>
<rect x="0" y="225" width="225" height="225" fill="none" stroke="black"/>
</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">
<g id="drawRects">
<rect x="225" y="0" width="225" height="225" fill="red"/>
<!--<image x="0" y="225" width="225" height="225" xlink:href="../svg/struct-image-12-b.svg"/>-->
<rect x="0" y="225" width="225" height="225" fill="none" stroke="black"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" id="root" width="100" height="100" viewBox="0 0 100 100">
<rect id="r" width="100" height="100" fill="green">
<set attributeName="fill" to="red"/>
</rect>
<script>document.getElementById("r").setAttribute("fill", "red");</script>
</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">
<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>
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