<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.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 -->
<!-- renamed and split for svgt/b to text-align-04-b.svg -->
<!-- -->
<!-- Test viewer basic capability to handle 'text-anchor' property. -->
<!-- -->
<!-- Author : Lofton Henderson, 05-aug-2000. -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- Revised for svgt/b: Ola Andersson Jun/26/2002 -->
<!-- -->
<!-- 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="100%" height="100%" viewBox="0 0 480 360" version="1.1" baseProfile="basic">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<!--nav data here-->
<OperatorScript version="$Revision: 1.5 $" testname="text-align-04-b.svg">
<Paragraph>
Test for viewer capibility to handle the basics of the 'textAnchor'
alignment property for 'text' and related elements.
</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 rendered picture should match the reference image, except for
possible variations in the text fonts and layout (per CSS2 rules).
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-align-04-b</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">
<text x="5" y="40" font-family="Arial" font-size="40" fill="black" >Test of 'text-anchor'</text>
<defs>
<text id="tref-internal-reference">end text tref</text>
<path id="myPath" d="M -5 260 220 260"/>
</defs>
<text x="20" y="80" font-family="Arial" font-size="30" fill="black" >Tspan, tref, toap</text>
<!-- Test cases -->
<line x1="220" y1="120" x2="220" y2="260" stroke="red" />
<g font-family="Arial" font-size="30" fill="blue" >
<text x="220" y="140" text-anchor="start" >start text <tspan xml:space="preserve" fill="red" > red tspan</tspan></text>
<text x="220" y="180" text-anchor="middle" >middle text <tspan font-weight="bold" xml:space="preserve"> bold tspan</tspan></text>
<text x="220" y="220" 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>
</g>
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.5 $</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
<script>
if (window.testRunner)
testRunner.dumpSelectionRect();
var range = document.createRange();
range.selectNode(window.document.documentElement);
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
</script>
</svg>