| 1 |
<svg version="1.1" baseProfile="tiny" 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="AE" author="VH" status="accepted" |
| 15 |
version="$Revision: 1.9 $" testname="$RCSfile: text-text-06-t.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#TextElement"> |
| 17 |
<p> |
| 18 |
The purpose of this test is to validate the interaction of x/y |
| 19 |
glyph positioning and ligatures. |
| 20 |
</p> |
| 21 |
<p> |
| 22 |
The first line shows an example where there is a ligature (fi) which |
| 23 |
should be accounted for before breaking into text chunks (see specification |
| 24 |
section 10.5, additional x/y/dx/dy processing rules, bullet discussing |
| 25 |
ligatures). In this first line, the ligatures cause the x position 180 |
| 26 |
(shown in orange), to be ignored. As a result, a glyph should be shown over |
| 27 |
each pale blue square markers. The glyphs are black squares of increasing sizes |
| 28 |
except for the initial ligature which has the form of two small black triangles |
| 29 |
joined at their tops. The ligature should show on the first pale blue |
| 30 |
marker position. |
| 31 |
</p> |
| 32 |
<p> |
| 33 |
The second line shows the same test but using multiple y positions. |
| 34 |
</p> |
| 35 |
<p> |
| 36 |
The third line shows the same test but using multiple x and y |
| 37 |
positions. |
| 38 |
</p> |
| 39 |
</d:testDescription> |
| 40 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 41 |
<p> |
| 42 |
Run the test. No interaction required. |
| 43 |
</p> |
| 44 |
</d:operatorScript> |
| 45 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 46 |
<p> |
| 47 |
The test is passed if: |
| 48 |
</p> |
| 49 |
<ul> |
| 50 |
<li> |
| 51 |
The bottom left hand corners of the first row of black squares are |
| 52 |
equal distance apart along the x axis and are centered inside the blue |
| 53 |
squares. |
| 54 |
</li> |
| 55 |
<li> |
| 56 |
The bottom left hand corners of the first row of black squares are |
| 57 |
equal distance apart along the x and y axis and are centered inside |
| 58 |
the blue squares. |
| 59 |
</li> |
| 60 |
<li> |
| 61 |
The bottom left hand corners of the first row of black squares are |
| 62 |
same distance apart in the x axis as the first row of squares and are |
| 63 |
same distance apart in the y axis as the second row of squares. |
| 64 |
</li> |
| 65 |
</ul> |
| 66 |
</d:passCriteria> |
| 67 |
</d:SVGTestCase> |
| 68 |
<title id="test-title">$RCSfile: text-text-06-t.svg,v $</title> |
| 69 |
<defs> |
| 70 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 71 |
<font-face-src> |
| 72 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 73 |
</font-face-src> |
| 74 |
</font-face> |
| 75 |
</defs> |
| 76 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 77 |
<style type="text/css"> |
| 78 |
@font-face { |
| 79 |
font-family: embeded; |
| 80 |
src: url(woffs/embeded-text-text-06.woff) format("woff"); |
| 81 |
} |
| 82 |
</style> |
| 83 |
<g font-size="10"> |
| 84 |
<defs> |
| 85 |
<font id="embeded" horiz-adv-x="224"> |
| 86 |
<font-face font-family="embeded" units-per-em="1000" panose-1="0 0 0 0 0 0 0 0 0 0" ascent="917" descent="-250" alphabetic="0"/> |
| 87 |
<missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z"/> |
| 88 |
<glyph unicode="1" glyph-name="gl_1" horiz-adv-x="1500" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/> |
| 89 |
<glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z"/> |
| 90 |
<glyph unicode="3" glyph-name="gl_3" horiz-adv-x="1500" d="M 0 0 L 750 0 L 750 750 L 0 750 Z"/> |
| 91 |
<glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1500" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z"/> |
| 92 |
<glyph unicode="fi" glyph-name="fi" horiz-adv-x="1500" d="M 0 0 L 500 0 L 0 700 L 500 700 Z"/> |
| 93 |
</font> |
| 94 |
</defs> |
| 95 |
|
| 96 |
<defs> |
| 97 |
<g id="marker"> |
| 98 |
<line y2="-15" stroke="orange"/> |
| 99 |
<rect x="-4" y="-4" width="8" height="8"/> |
| 100 |
</g> |
| 101 |
</defs> |
| 102 |
|
| 103 |
<g transform="translate(20, 30)"> |
| 104 |
<g id="legend" transform="translate(10, 40)" font-size="12"> |
| 105 |
<text>x positioning</text> |
| 106 |
<text y="40">y positioning</text> |
| 107 |
<text y="140">x/y positioning</text> |
| 108 |
</g> |
| 109 |
|
| 110 |
<g transform="translate(100, 40)"> |
| 111 |
<use xlink:href="#marker" x="10" fill="#8888ff"/> |
| 112 |
<use xlink:href="#marker" x="180" fill="orange"/> |
| 113 |
<use xlink:href="#marker" x="40" fill="#8888ff"/> |
| 114 |
<use xlink:href="#marker" x="70" fill="#8888ff"/> |
| 115 |
<use xlink:href="#marker" x="100" fill="#8888ff"/> |
| 116 |
<use xlink:href="#marker" x="130" fill="#8888ff"/> |
| 117 |
<text x="10 180 40 70 100 130" y="0" font-family="embeded">fi1234</text> |
| 118 |
</g> |
| 119 |
|
| 120 |
<g transform="translate(100, 80)"> |
| 121 |
<use xlink:href="#marker" y="-10" fill="#8888ff"/> |
| 122 |
<use xlink:href="#marker" x="15" y="50" fill="orange"/> |
| 123 |
<use xlink:href="#marker" x="15" y="0" fill="#8888ff"/> |
| 124 |
<use xlink:href="#marker" x="30" y="10" fill="#8888ff"/> |
| 125 |
<use xlink:href="#marker" x="45" y="20" fill="#8888ff"/> |
| 126 |
<use xlink:href="#marker" x="60" y="30" fill="#8888ff"/> |
| 127 |
<text y="-10 50 0 10 20 30" x="0" font-family="embeded">fi1234</text> |
| 128 |
</g> |
| 129 |
|
| 130 |
<g transform="translate(100, 180)"> |
| 131 |
<use xlink:href="#marker" x="10" y="-10" fill="#8888ff"/> |
| 132 |
<use xlink:href="#marker" x="180" y="50" fill="orange"/> |
| 133 |
<use xlink:href="#marker" x="40" y="0" fill="#8888ff"/> |
| 134 |
<use xlink:href="#marker" x="70" y="10" fill="#8888ff"/> |
| 135 |
<use xlink:href="#marker" x="100" y="20" fill="#8888ff"/> |
| 136 |
<use xlink:href="#marker" x="130" y="30" fill="#8888ff"/> |
| 137 |
<text x="10 180 40 70 100 130" y="-10 50 0 10 20 30" font-family="embeded">fi1234</text> |
| 138 |
</g> |
| 139 |
</g> |
| 140 |
</g> |
| 141 |
</g> |
| 142 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 143 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text> |
| 144 |
</g> |
| 145 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 146 |
<!-- comment out this watermark once the test is approved --> |
| 147 |
<!--<g id="draft-watermark"> |
| 148 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 149 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 150 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 151 |
</g>--> |
| 152 |
</svg> |