| 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="AG" owner="CL" status="accepted" |
| 15 |
version="$Revision: 1.5 $" testname="$RCSfile: text-fonts-203-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 five weights is specified, with a fallback to 'serif'. |
| 20 |
</p> |
| 21 |
<p> |
| 22 |
The specified font family has five weights - 300, 400, 600, 700 and 800. |
| 23 |
See the CSS3 Font specification |
| 24 |
for how these are allocated to the nine weight numbers. |
| 25 |
</p> |
| 26 |
<p> |
| 27 |
The absolute keywords 'normal' and bold' are tested by the first two lines on the |
| 28 |
right hand side of the test, the third line of text tests the to 'bolder' relative |
| 29 |
keyword and the fourth tests the 'lighter' relative keyword. |
| 30 |
</p> |
| 31 |
<p>The fonts are SVG fonts convertted, with the author's explicit permission, |
| 32 |
from <a href="http://justanotherfoundry.com/Zalamander/index.htm">Zalamander Caps</a> |
| 33 |
by Tim Ahrens of <a href="http://justanotherfoundry.com/">Just Another Foundry</a>. |
| 34 |
An ASCII subset has been generated for this test. The font names have been |
| 35 |
obfuscated, to deter |
| 36 |
user agent sniffing for keywords like "Ultrabold". All weights in this generated |
| 37 |
family are multiples of 100 and greater or equal to 300.</p> |
| 38 |
</d:testDescription> |
| 39 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 40 |
<p> |
| 41 |
Run the test. No interaction required. |
| 42 |
</p> |
| 43 |
</d:operatorScript> |
| 44 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 45 |
<p> |
| 46 |
The numerical weight values (100 to 900) should show the lighter weights on the |
| 47 |
lower numbers and the heavier weights on the larger numbers. Heavier is defined |
| 48 |
to mean 'no lighter'. |
| 49 |
</p> |
| 50 |
</d:passCriteria> |
| 51 |
</d:SVGTestCase> |
| 52 |
<title id="test-title">$RCSfile: text-fonts-203-t.svg,v $</title> |
| 53 |
<defs> |
| 54 |
<font-face |
| 55 |
font-family="SVGFreeSansASCII" |
| 56 |
unicode-range="U+0-7F"> |
| 57 |
<font-face-src> |
| 58 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 59 |
</font-face-src> |
| 60 |
</font-face> |
| 61 |
</defs> |
| 62 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 63 |
<defs> |
| 64 |
<font-face |
| 65 |
font-family="ZC" |
| 66 |
unicode-range="U+0-7F" |
| 67 |
font-weight="300" |
| 68 |
font-variant="small-caps"> |
| 69 |
<font-face-src> |
| 70 |
<font-face-uri xlink:href="../resources/ZCL.svg#ZCL"/> |
| 71 |
</font-face-src> |
| 72 |
</font-face> |
| 73 |
<font-face |
| 74 |
font-family="ZC" |
| 75 |
unicode-range="U+0-7F" |
| 76 |
font-weight="400" |
| 77 |
font-variant="small-caps"> |
| 78 |
<font-face-src> |
| 79 |
<font-face-uri xlink:href="../resources/ZCR.svg#ZCR"/> |
| 80 |
</font-face-src> |
| 81 |
</font-face> |
| 82 |
<font-face |
| 83 |
font-family="ZC" |
| 84 |
unicode-range="U+0-7F" |
| 85 |
font-weight="600" |
| 86 |
font-variant="small-caps"> |
| 87 |
<font-face-src> |
| 88 |
<font-face-uri xlink:href="../resources/ZCSB.svg#ZCSB"/> |
| 89 |
</font-face-src> |
| 90 |
</font-face> |
| 91 |
<font-face |
| 92 |
font-family="ZC" |
| 93 |
unicode-range="U+0-7F" |
| 94 |
font-weight="700" |
| 95 |
font-variant="small-caps"> |
| 96 |
<font-face-src> |
| 97 |
<font-face-uri xlink:href="../resources/ZCB.svg#ZCB"/> |
| 98 |
</font-face-src> |
| 99 |
</font-face> |
| 100 |
<font-face |
| 101 |
font-family="ZC" |
| 102 |
unicode-range="U+0-7F" |
| 103 |
font-weight="800" |
| 104 |
font-variant="small-caps"> |
| 105 |
<font-face-src> |
| 106 |
<font-face-uri xlink:href="../resources/ZCXB.svg#ZCXB"/> |
| 107 |
</font-face-src> |
| 108 |
</font-face> |
| 109 |
</defs> |
| 110 |
|
| 111 |
<g font-family="'ZC', serif" font-size="30" font-variant="small-caps"> |
| 112 |
<text font-weight="100" x="360" y="50">100</text> |
| 113 |
<text font-weight="200" x="360" y="85">200</text> |
| 114 |
<text font-weight="300" x="360" y="120">300</text> |
| 115 |
<text font-weight="400" x="360" y="155">400</text> |
| 116 |
<text font-weight="500" x="360" y="190">500</text> |
| 117 |
<text fill="green" font-weight="600" x="360" y="225">600</text> |
| 118 |
<text fill="green" font-weight="700" x="360" y="260">700</text> |
| 119 |
<text fill="green" font-weight="800" x="360" y="295">800</text> |
| 120 |
<text fill="green" font-weight="900" x="360" y="330">900</text> |
| 121 |
<text font-weight="bold" x="60" y="80">This is bold</text> |
| 122 |
<text font-weight="normal" x="60" y="130">This is normal</text> |
| 123 |
<g font-weight="normal" fill="blue"> |
| 124 |
<text font-weight="bolder" x="60" y="180">Blue is bolder</text> |
| 125 |
</g> |
| 126 |
<g font-weight="bold" fill="blue"> |
| 127 |
<text font-weight="lighter" x="60" y="230">Blue is lighter</text> |
| 128 |
</g> |
| 129 |
<g font-size="14"> |
| 130 |
<text x="30" y="270">ZalamanderCaps is an OpenType font</text> |
| 131 |
<text x="30" y="290">by Tim Ahrens of Just Another Foundry</text> |
| 132 |
</g> |
| 133 |
</g> |
| 134 |
|
| 135 |
</g> |
| 136 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 137 |
<text id="revision" x="10" y="340" stroke="none" |
| 138 |
fill="black">$Revision: 1.5 $</text> |
| 139 |
</g> |
| 140 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 141 |
<!-- comment out this watermark once the test is approved --> |
| 142 |
<!--<g id="draft-watermark"> |
| 143 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 144 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 145 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 146 |
</g>--> |
| 147 |
</svg> |