| 1 |
<svg id="svg-root" width="100%" height="100%" |
| 2 |
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 7 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 8 |
<!--= All Rights Reserved. =--> |
| 9 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 10 |
<!--======================================================================--> |
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 12 |
template-version="1.4" reviewer="AG" author="ED" status="accepted" |
| 13 |
version="$Revision: 1.7 $" testname="$RCSfile: text-path-02-b.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html"> |
| 15 |
<p> |
| 16 |
This tests the <a>'textPath/startOffset'</a> with both negative and positive values, and |
| 17 |
compares it to the case where a <a>'tspan/dx'</a> attribute is used with the same values. |
| 18 |
</p> |
| 19 |
</d:testDescription> |
| 20 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 21 |
<p> |
| 22 |
Run the test. No interaction required. Make sure scripting is enabled. |
| 23 |
</p> |
| 24 |
</d:operatorScript> |
| 25 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 26 |
<p> |
| 27 |
You should see four paths with text following each path. |
| 28 |
The top two paths should show the text "Negative offset", and the bottom two paths should show the text |
| 29 |
"Positive offset". |
| 30 |
</p> |
| 31 |
<p> |
| 32 |
The test has passed if: |
| 33 |
</p> |
| 34 |
<ul> |
| 35 |
<li>the top two paths show the text "Negative offset"</li> |
| 36 |
<li>the bottom two paths show the text "Positive offset"</li> |
| 37 |
<li>the text on the bottom two paths starts a bit along the path</li> |
| 38 |
<li>the text on the top two paths starts close to where the path starts (the first character is allowed to be slightly off the path)</li> |
| 39 |
</ul> |
| 40 |
</d:passCriteria> |
| 41 |
</d:SVGTestCase> |
| 42 |
<title id="test-title">$RCSfile: text-path-02-b.svg,v $</title> |
| 43 |
<defs> |
| 44 |
<font-face |
| 45 |
font-family="SVGFreeSansASCII" |
| 46 |
unicode-range="U+0-7F"> |
| 47 |
<font-face-src> |
| 48 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 49 |
</font-face-src> |
| 50 |
</font-face> |
| 51 |
</defs> |
| 52 |
<g id="test-body-content" font-family="SVGFreeSansASCII, FreeSansWoff, sans-serif" font-size="18"> |
| 53 |
<defs> |
| 54 |
<style type="text/css"> |
| 55 |
@font-face { |
| 56 |
font-family: FreeSansWoff; |
| 57 |
src: url(woffs/FreeSans.woff) format("woff"); |
| 58 |
} |
| 59 |
</style> |
| 60 |
<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"/> |
| 61 |
<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"/> |
| 62 |
</defs> |
| 63 |
<g id="text-on-path-01"> |
| 64 |
<use xlink:href="#Path1" fill="none" stroke="blue" /> |
| 65 |
<text font-size="36" fill="black" > |
| 66 |
<textPath xlink:href="#Path1"><tspan dx="-240">Positive offset Negative offset</tspan></textPath> |
| 67 |
</text> |
| 68 |
</g> |
| 69 |
<g id="text-on-path-02"> |
| 70 |
<use xlink:href="#Path2" fill="none" stroke="blue" /> |
| 71 |
<text font-size="36" fill="black" > |
| 72 |
<textPath xlink:href="#Path2" startOffset="-240">Positive offset Negative offset</textPath> |
| 73 |
</text> |
| 74 |
</g> |
| 75 |
<g transform="translate(0 150)"> |
| 76 |
<g id="text-on-path-03"> |
| 77 |
<use xlink:href="#Path1" fill="none" stroke="blue" /> |
| 78 |
<text font-size="36" fill="black" > |
| 79 |
<textPath xlink:href="#Path1"><tspan dx="60">Positive offset Negative offset</tspan></textPath> |
| 80 |
</text> |
| 81 |
</g> |
| 82 |
<g id="text-on-path-04"> |
| 83 |
<use xlink:href="#Path2" fill="none" stroke="blue" /> |
| 84 |
<text font-size="36" fill="black" > |
| 85 |
<textPath xlink:href="#Path2" startOffset="60">Positive offset Negative offset</textPath> |
| 86 |
</text> |
| 87 |
</g> |
| 88 |
</g> |
| 89 |
</g> |
| 90 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 91 |
<text id="revision" x="10" y="340" stroke="none" |
| 92 |
fill="black">$Revision: 1.7 $</text> |
| 93 |
</g> |
| 94 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 95 |
<!-- comment out this watermark once the test is approved --> |
| 96 |
<!--<g id="draft-watermark"> |
| 97 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 98 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 99 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 100 |
</g>--> |
| 101 |
</svg> |