Debian Codegraph @

test_non_regression/fail/font/fonts-desc-05-t.svg

raw
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="CL" author="CN" status="reviewed"
15 version="$Revision: 1.7 $" testname="$RCSfile: fonts-desc-05-t.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/fonts.html#SVGFontsOverview">
17 <p>
18 This tests a combination of font attribute matching.
19 </p>
20 </d:testDescription>
21 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
22 <p>
23 Run the test. No interaction required.
24 </p>
25 </d:operatorScript>
26 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
27 <p>
28 The correct result for the first line is diamond, diamond, upward-triangle,
29 downard-triangle. The correct result for the second line is
30 upward-triangle, downard triangle, and a right-triangle.
31 </p>
32 <p>
33 Reasoning for glyphs on the first line:
34 The first character is a diamond because it is matched purely
35 on the font-style attribute. The second character is a diamond
36 because font-style (italic) is of highest precedence, followed
37 by font-variant (normal), then font-weight (bold). The third
38 character matches upward-triangle because again font-variant
39 (small-caps) is a higher precedence than font-weight. The
40 fourth character undisputedly matches the downward-triangle.
41 </p>
42 <p>
43 Reasoning for the glyphs on the second line:
44 The first character is a upward-triangle because the font
45 matching must fall back to SVGFont1 to get a match
46 for small-caps. The second character is a downward-triangle
47 because there is no match for small-caps in SVGFont2.
48 The third character is a right facing triangle because
49 italic should match oblique in SVGFont2.
50 </p>
51 </d:passCriteria>
52 </d:SVGTestCase>
53 <title id="test-title">$RCSfile: fonts-desc-05-t.svg,v $</title>
54 <defs>
55 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
56 <font-face-src>
57 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
58 </font-face-src>
59 </font-face>
60 </defs>
61 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
62 <defs>
63 <font horiz-adv-x="500">
64 <font-face font-family="SVGFont1" units-per-em="1000" ascent="800" descent="200" alphabetic="200"/>
65 <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/>
66 <glyph unicode=" " glyph-name="space"/>
67 <glyph unicode="a" glyph-name="square" d="M0 250L500 250L500 750L0 750Z"/>
68 </font>
69
70 <font horiz-adv-x="500">
71 <font-face font-family="SVGFont1" font-style="italic" font-variant="small-caps" font-weight="bold" units-per-em="1000" ascent="800" descent="200" alphabetic="200"/>
72 <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/>
73 <glyph unicode=" " glyph-name="space"/>
74 <glyph unicode="a" glyph-name="upward-triangle" d="M0 0L500 0L250 900Z"/>
75 </font>
76
77 <font horiz-adv-x="500">
78 <font-face font-family="SVGFont1" font-variant="small-caps" font-weight="bold" units-per-em="1000" ascent="800" descent="200" alphabetic="200"/>
79 <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/>
80 <glyph unicode=" " glyph-name="space"/>
81 <glyph unicode="a" glyph-name="downward-triangle" d="M250 0L0 900L500 900Z"/>
82 </font>
83
84 <font horiz-adv-x="500">
85 <font-face font-family="SVGFont1" font-style="italic" units-per-em="1000" ascent="800" descent="200" alphabetic="200"/>
86 <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/>
87 <glyph unicode=" " glyph-name="space"/>
88 <glyph unicode="a" glyph-name="diamond" d="M0 500L250 250L500 500L250 750Z"/>
89 </font>
90
91 <font horiz-adv-x="500">
92 <font-face font-family="SVGFont1" font-style="oblique" font-weight="bold" units-per-em="1000" ascent="800" descent="200" alphabetic="200"/>
93 <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/>
94 <glyph unicode=" " glyph-name="space"/>
95 <glyph unicode="a" glyph-name="circle" d="M250 500A 250,250 0 1,0 250 499 Z"/>
96 </font>
97
98 <font horiz-adv-x="500">
99 <font-face font-family="SVGFont2" font-style="oblique" units-per-em="1000" ascent="800" descent="200" alphabetic="200"/>
100 <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/>
101 <glyph unicode=" " glyph-name="space"/>
102 <glyph unicode="a" glyph-name="right-triangle" d="M0 100L0 600L900 350Z"/>
103 </font>
104
105 <font horiz-adv-x="500">
106 <font-face font-family="SVGFont2" font-weight="bold" units-per-em="1000" ascent="800" descent="200" alphabetic="200"/>
107 <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/>
108 <glyph unicode=" " glyph-name="space"/>
109 <glyph unicode="a" glyph-name="left-triangle" d="M900 100L900 600L0 350Z"/>
110 </font>
111
112 </defs>
113 <g transform="scale(1.5) translate(0, -50)">
114 <!-- This should produce a diamond, diamond, upward-triangle, downard-triangle. -->
115 <text x="50" y="100" font-size="20" font-family="SVGFont1" font-style="italic">a</text>
116 <text x="100" y="100" font-size="20" font-family="SVGFont1" font-style="italic" font-weight="bold">a</text>
117 <text x="150" y="100" font-size="20" font-family="SVGFont1" font-style="italic" font-variant="small-caps">a</text>
118 <text x="200" y="100" font-size="20" font-family="SVGFont1" font-variant="small-caps" font-weight="bold">a</text>
119
120 <!-- This should produce a upward-triangle, downard triangle, and a right-triangle. -->
121 <text x="50" y="200" font-size="20" font-family="SVGFont2, SVGFont1" font-style="italic" font-variant="small-caps" font-weight="bold">a</text>
122 <text x="100" y="200" font-size="20" font-family="SVGFont2, SVGFont1" font-variant="small-caps" font-weight="bold">a</text>
123 <text x="150" y="200" font-size="20" font-family="SVGFont2, SVGFont1" font-style="italic">a</text>
124 </g>
125 </g>
126 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
127 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
128 </g>
129 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
130 <!-- comment out this watermark once the test is approved -->
131 <g id="draft-watermark">
132 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
133 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
134 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
135 </g>
136 </svg>