| 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="AG" author="Shenxue Zhou" status="accepted" |
| 15 |
version="$Revision: 1.6 $" testname="$RCSfile: text-path-01-b.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#TextOnAPath"> |
| 17 |
<p> |
| 18 |
Test textPath element in combination with the tspan element. Properties |
| 19 |
of the text on a path are changed using the tspan element. |
| 20 |
</p> |
| 21 |
</d:testDescription> |
| 22 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 23 |
<p> |
| 24 |
Run the test. No interaction required. Make sure scripting is enabled. |
| 25 |
</p> |
| 26 |
</d:operatorScript> |
| 27 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 28 |
<p> |
| 29 |
For this test to pass the rendered output must match the reference |
| 30 |
image. The letters "Te" in first "Text on a path" sentence must be |
| 31 |
colored pink and offset from the path in the y direction. |
| 32 |
</p> |
| 33 |
</d:passCriteria> |
| 34 |
</d:SVGTestCase> |
| 35 |
<title id="test-title">$RCSfile: text-path-01-b.svg,v $</title> |
| 36 |
<defs> |
| 37 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 38 |
<font-face-src> |
| 39 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 40 |
</font-face-src> |
| 41 |
</font-face> |
| 42 |
</defs> |
| 43 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 44 |
<defs> |
| 45 |
<path id="Path1" fill="none" stroke="blue" d="M199 89.3 C206.6 66.6 235.8 13.2 270 30.3 286.6 38.6 298.9 59.4 310 73.3 321.7 87.9 338.6 99 356 103.3 387.3 111.1 396.6 90.4 418 74.3"/> |
| 46 |
<path id="Path2" fill="none" stroke="blue" d="M33.5 145.8 C41 123 70.3 69.7 104.5 86.8 121 95 133 116 144.5 129.8 156.2 144.4 173 155.5 190.5 159.8 221.8 167.6 231 146.9 252.5 130.8"/> |
| 47 |
<path id="Path3" fill="none" stroke="blue" stroke-width="4" d="M113 233 L413 233 "/> |
| 48 |
</defs> |
| 49 |
<g id="text-on-path-01"> |
| 50 |
<use xlink:href="#Path1" fill="none" stroke="blue"/> |
| 51 |
<text font-size="36" font-family="Arial" fill="black"> |
| 52 |
<textPath xlink:href="#Path1">Text on a path</textPath> |
| 53 |
</text> |
| 54 |
</g> |
| 55 |
<g id="text-on-path-02"> |
| 56 |
<!-- using tspan to change text color and position --> |
| 57 |
<use xlink:href="#Path2" fill="none" stroke="blue"/> |
| 58 |
<text font-size="36" font-family="Arial" fill="black"> |
| 59 |
<textPath xlink:href="#Path2"> |
| 60 |
<tspan dy="-12" fill="fuchsia">Te</tspan><tspan dy="12">x</tspan>t on a path |
| 61 |
</textPath> |
| 62 |
</text> |
| 63 |
<rect x="17" y="169" width="274" height="41" fill="none" stroke="black"/> |
| 64 |
<text x="19" y="185" font-size="20" font-family="Arial">'tspan' subelement inside </text> |
| 65 |
<text x="19" y="207" font-size="20" font-family="Arial">the 'textPath' element.</text> |
| 66 |
</g> |
| 67 |
<g id="text-on-path-03"> |
| 68 |
<use xlink:href="#Path3" fill="none" stroke="blue" stroke-width="4"/> |
| 69 |
<text font-size="24" font-family="Arial" fill="black"> |
| 70 |
<textPath xlink:href="#Path3" startOffset="33%">The Text on path</textPath> |
| 71 |
</text> |
| 72 |
<rect x="118" y="250" width="260" height="41" fill="none" stroke="black"/> |
| 73 |
<text x="120" y="267" font-size="20" font-family="Arial">'startOffset' attribute of the</text> |
| 74 |
<text x="120" y="287" font-size="20" font-family="Arial">'textPath' element.</text> |
| 75 |
</g> |
| 76 |
</g> |
| 77 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 78 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 79 |
</g> |
| 80 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 81 |
<!-- comment out this watermark once the test is approved --> |
| 82 |
<!--<g id="draft-watermark"> |
| 83 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 84 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 85 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 86 |
</g>--> |
| 87 |
</svg> |