| 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.8 $" testname="$RCSfile: text-align-04-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 'text-anchor' |
| 19 |
alignment property for 'text' and related elements. |
| 20 |
</p> |
| 21 |
<p> |
| 22 |
The second group from the top contains sub-tests to verify that the |
| 23 |
interpreter handles text-anchor when the text is comprised of other |
| 24 |
text related elements, 'tspan', 'tref', and 'textPath'. |
| 25 |
The text-anchor property is present on the containing 'text' element |
| 26 |
in these cases, not on the contained child elements. |
| 27 |
</p> |
| 28 |
</d:testDescription> |
| 29 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 30 |
<p> |
| 31 |
Run the test. No interaction required. |
| 32 |
</p> |
| 33 |
</d:operatorScript> |
| 34 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 35 |
<p> |
| 36 |
The test is passed if: |
| 37 |
</p> |
| 38 |
<ul> |
| 39 |
<li> |
| 40 |
The text "start text pink tspan" begins just to the right of the |
| 41 |
vertical pink line. |
| 42 |
</li> |
| 43 |
<li> |
| 44 |
The text "middle text bold tspan" is split by the vertical pink line |
| 45 |
between the words "text" and "bold". |
| 46 |
</li> |
| 47 |
<li> |
| 48 |
The text "end text tref" ends just to the left of the vertical pink |
| 49 |
line. |
| 50 |
</li> |
| 51 |
<li> |
| 52 |
The text "end text on path" ends just to the left of the vertical pink |
| 53 |
line. |
| 54 |
</li> |
| 55 |
</ul> |
| 56 |
</d:passCriteria> |
| 57 |
</d:SVGTestCase> |
| 58 |
<title id="test-title">$RCSfile: text-align-04-b.svg,v $</title> |
| 59 |
<defs> |
| 60 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 61 |
<font-face-src> |
| 62 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 63 |
</font-face-src> |
| 64 |
</font-face> |
| 65 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F" font-weight="700"> |
| 66 |
<font-face-src> |
| 67 |
<font-face-uri xlink:href="../resources/SVGFreeSansBold.svg#ascii"/> |
| 68 |
</font-face-src> |
| 69 |
</font-face> |
| 70 |
</defs> |
| 71 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 72 |
<text x="5" y="40" font-size="36" fill="black">Test of 'text-anchor'</text> |
| 73 |
<defs> |
| 74 |
<text id="tref-internal-reference">end text tref</text> |
| 75 |
<path id="myPath" d="M -5 260 220 260"/> |
| 76 |
</defs> |
| 77 |
|
| 78 |
<text x="20" y="80" font-size="30" fill="black">Tspan, tref, toap</text> |
| 79 |
<!-- Test cases --> |
| 80 |
<line x1="220" y1="120" x2="220" y2="260" stroke="fuchsia"/> |
| 81 |
<g font-size="16" fill="blue"> |
| 82 |
<text x="220" y="140" text-anchor="start"> |
| 83 |
start text <tspan xml:space="preserve" fill="fuchsia"> pink tspan</tspan> |
| 84 |
</text> |
| 85 |
<text x="220" y="180" text-anchor="middle"> |
| 86 |
middle text <tspan font-weight="bold" xml:space="preserve"> bold tspan</tspan> |
| 87 |
</text> |
| 88 |
<text x="220" y="220" text-anchor="end"> |
| 89 |
<tref xlink:href="#tref-internal-reference"/> |
| 90 |
</text> |
| 91 |
<text text-anchor="end"> |
| 92 |
<textPath text-anchor="end" startOffset="100%" xlink:href="#myPath">Text-anchor: end text on path</textPath> |
| 93 |
</text> |
| 94 |
</g> |
| 95 |
</g> |
| 96 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 97 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text> |
| 98 |
</g> |
| 99 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 100 |
<!-- comment out this watermark once the test is approved --> |
| 101 |
<!--<g id="draft-watermark"> |
| 102 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 103 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 104 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 105 |
</g>--> |
| 106 |
</svg> |