| 1 |
<svg version="1.1" baseProfile="basic" id="svg-root" |
| 2 |
width="100%" height="100%" viewBox="0 0 480 360" |
| 3 |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= SVG 1.1 2nd Edition Test Case =--> |
| 6 |
<!--======================================================================--> |
| 7 |
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =--> |
| 8 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 9 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 10 |
<!--= All Rights Reserved. =--> |
| 11 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 12 |
<!--======================================================================--> |
| 13 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 14 |
template-version="1.4" reviewer="SVGWG" author="Lofton Henderson" status="accepted" |
| 15 |
version="$Revision: 1.7 $" testname="$RCSfile: text-align-03-b.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#AlignmentProperties"> |
| 17 |
<p> |
| 18 |
Test for viewer capibility to handle the basics of the 'textAnchor' |
| 19 |
alignment property for 'text' and related elements. |
| 20 |
</p> |
| 21 |
<p> |
| 22 |
This test verify that |
| 23 |
the interpreter correctly handles and applies the text-anchor |
| 24 |
properties when present on "chunks", which are comprised of tspan elements |
| 25 |
with absolute positioning, within the containing 'text' element. |
| 26 |
</p> |
| 27 |
</d:testDescription> |
| 28 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 29 |
<p> |
| 30 |
Run the test. No interaction required. |
| 31 |
</p> |
| 32 |
</d:operatorScript> |
| 33 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 34 |
<p> |
| 35 |
The test is passed if |
| 36 |
</p> |
| 37 |
<ul> |
| 38 |
<li> |
| 39 |
The text "Begin with "end"," ends just to the left of the vertical pink |
| 40 |
line. |
| 41 |
</li> |
| 42 |
<li> |
| 43 |
The text "switch to "middle" in a tspan," is split by the vertical pink |
| 44 |
line roughly through the second 'd' in the world "middle". |
| 45 |
</li> |
| 46 |
<li> |
| 47 |
The text "and "start" ends it." begins just to the right of the |
| 48 |
vertical pink line. |
| 49 |
</li> |
| 50 |
</ul> |
| 51 |
</d:passCriteria> |
| 52 |
</d:SVGTestCase> |
| 53 |
<title id="test-title">$RCSfile: text-align-03-b.svg,v $</title> |
| 54 |
<defs> |
| 55 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 56 |
<font-face-src> |
| 57 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 58 |
</font-face-src> |
| 59 |
</font-face> |
| 60 |
</defs> |
| 61 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 62 |
<text x="5" y="40" font-size="40" fill="black">Test of 'text-anchor'</text> |
| 63 |
|
| 64 |
<!-- Test cases --> |
| 65 |
<line x1="225" y1="75" x2="225" y2="225" stroke="fuchsia"/> |
| 66 |
<g font-size="30" fill="blue"> |
| 67 |
<text x="225" y="110" text-anchor="end"> |
| 68 |
Begin with "end",<tspan x="225" y="160" xml:space="preserve" text-anchor="middle"> switch to "middle" in a tspan, </tspan><tspan x="225" y="210" text-anchor="start">and "start" ends it.</tspan> |
| 69 |
</text> |
| 70 |
</g> |
| 71 |
</g> |
| 72 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 73 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text> |
| 74 |
</g> |
| 75 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 76 |
<!-- comment out this watermark once the test is approved --> |
| 77 |
<!--<g id="draft-watermark"> |
| 78 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 79 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 80 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 81 |
</g>--> |
| 82 |
</svg> |