| 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="DS" owner="CL" status="accepted" |
| 15 |
version="$Revision: 1.4 $" testname="$RCSfile: text-fonts-202-t.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#FontPropertiesUsedBySVG"> |
| 17 |
<p> |
| 18 |
This tests the 'font-weight' property when multiple weights are available. A |
| 19 |
font family with six weights is specified, with a fallback to 'serif'. |
| 20 |
</p> |
| 21 |
<p> |
| 22 |
If only one font weight is available, they should all display at the same weight. |
| 23 |
The transition from black to green figures shows the correct light to bold transition |
| 24 |
for the common case where two weights are available. If three or more weights are |
| 25 |
available, see the CSS2 specification for how these are allocated to the nine weight |
| 26 |
numbers. The specified font has six weights. |
| 27 |
</p> |
| 28 |
<p> |
| 29 |
The absolute keywords 'normal' and bold' are tested by the first two lines on the |
| 30 |
right hand side of the test, the third line of text tests the to 'bolder' relative |
| 31 |
keyword and the fourth tests the 'lighter' relative keyword. |
| 32 |
</p> |
| 33 |
</d:testDescription> |
| 34 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 35 |
<p> |
| 36 |
If the platform supports installable opentype fonts, please download and install |
| 37 |
<a href="http://justanotherfoundry.com/zalamander">Zalamander Caps</a> |
| 38 |
by Tim Ahrens of <a href="http://justanotherfoundry.com/">Just Another Foundry</a>. |
| 39 |
Then, view this test. |
| 40 |
</p> |
| 41 |
</d:operatorScript> |
| 42 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 43 |
<p> |
| 44 |
The numerical weight values (100 to 900) should show the lighter weights on the |
| 45 |
lower numbers and the heavier weights on the larger numbers. Heavier is defined |
| 46 |
to mean 'no lighter'. |
| 47 |
</p> |
| 48 |
</d:passCriteria> |
| 49 |
</d:SVGTestCase> |
| 50 |
<title id="test-title">$RCSfile: text-fonts-202-t.svg,v $</title> |
| 51 |
<defs> |
| 52 |
<font-face |
| 53 |
font-family="SVGFreeSansASCII" |
| 54 |
unicode-range="U+0-7F"> |
| 55 |
<font-face-src> |
| 56 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 57 |
</font-face-src> |
| 58 |
</font-face> |
| 59 |
</defs> |
| 60 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 61 |
|
| 62 |
<g font-family="'ZalamanderCaps', serif" font-size="30"> |
| 63 |
<text font-weight="100" x="360" y="50">100</text> |
| 64 |
<text font-weight="200" x="360" y="85">200</text> |
| 65 |
<text font-weight="300" x="360" y="120">300</text> |
| 66 |
<text font-weight="400" x="360" y="155">400</text> |
| 67 |
<text font-weight="500" x="360" y="190">500</text> |
| 68 |
<text fill="green" font-weight="600" x="360" y="225">600</text> |
| 69 |
<text fill="green" font-weight="700" x="360" y="260">700</text> |
| 70 |
<text fill="green" font-weight="800" x="360" y="295">800</text> |
| 71 |
<text fill="green" font-weight="900" x="360" y="330">900</text> |
| 72 |
<text font-weight="bold" x="60" y="80">This is bold</text> |
| 73 |
<text font-weight="normal" x="60" y="130">This is normal</text> |
| 74 |
<g font-weight="normal" fill="blue"> |
| 75 |
<text font-weight="bolder" x="60" y="180">Blue is bolder</text> |
| 76 |
</g> |
| 77 |
<g font-weight="bold" fill="blue"> |
| 78 |
<text font-weight="lighter" x="60" y="230">Blue is lighter</text> |
| 79 |
</g> |
| 80 |
<g font-size="14"> |
| 81 |
<text x="30" y="270">ZalamanderCaps is an OpenType font</text> |
| 82 |
<text x="30" y="290">by Tim Ahrens of Just Another Foundry</text> |
| 83 |
</g> |
| 84 |
</g> |
| 85 |
|
| 86 |
</g> |
| 87 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 88 |
<text id="revision" x="10" y="340" stroke="none" |
| 89 |
fill="black">$Revision: 1.4 $</text> |
| 90 |
</g> |
| 91 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 92 |
<!-- comment out this watermark once the test is approved --> |
| 93 |
<!-- |
| 94 |
<g id="draft-watermark"> |
| 95 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 96 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 97 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 98 |
</g> |
| 99 |
--> |
| 100 |
</svg> |