Debian Codegraph @

test_non_regression/fail/text/text-altglyph-01-b.svg

raw
1 <svg version="1.1" baseProfile="basic" 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="SVGWG" author="Jon Ferraiolo" status="accepted"
15 version="$Revision: 1.7 $" testname="$RCSfile: text-altglyph-01-b.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#AlternateGlyphs">
17 <p>
18 Test 'altGlyph' facilities and many-to-many chars to glyphs.
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 <p>
26 This test requires some support for SVG fonts.
27 </p>
28 </d:operatorScript>
29 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
30 <p>
31 Three text strings show: the word "HAPPY" in pink, the word "SAD" in green
32 and the word "SASSY" in blue.
33 </p>
34 <p>
35 The "HAPPY" and "SAD" strings test the 'altGlyph' facility and
36 the ability to map multiple glyphs to a single character.
37 All characters except the "D" are bracketed by 'altGlyph' elements
38 to use two different glyphs to render each character.
39 For "HAPPY", the horizontal stroke through the center of the characters
40 is a smile stroke.
41 For "SAD", the horizontal stroke through the center of the characters
42 is a frown stroke.
43 </p>
44 <p>
45 The "SASSY" string tests a single glyph representing multiple characters
46 (a ligature). The SVG font in the test case contains an "SS" ligature
47 so that the "SS" in "SASSY" is rendered with a single glyph, where
48 the two parts of the "SS" are connected.
49 </p>
50 </d:passCriteria>
51 </d:SVGTestCase>
52 <title id="test-title">$RCSfile: text-altglyph-01-b.svg,v $</title>
53 <defs>
54 <font-face font-family="SVGFreeSansASCII" 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 <g stroke-miterlimit="4">
62 <text font-family="Arial" font-size="40" x="5" y="50">Test 'altGlyph' facilities</text>
63 <text font-family="Arial" font-size="30" x="5" y="90">and many-to-many chars to glyphs</text>
64 <defs>
65 <font id="Font1" horiz-adv-x="5">
66 <font-face font-family="HappySad" font-weight="bold" font-style="normal" units-per-em="8" cap-height="8" x-height="4" ascent="8" descent="2" alphabetic="0" mathematical="4" ideographic="-2" hanging="8"/>
67 <missing-glyph d="M1,3h2v2h-2z"/>
68 <glyph id="A1" d="M0,0 L2,8 L4,0 M0,4 C1,3 3,3 4,4"/>
69 <glyph id="H1" d="M0,0 V8 M4,0 V8 M0,4 C1,3 3,3 4,4"/>
70 <glyph id="P1" d="M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,3 3,3 4,4"/>
71 <glyph id="S1" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 C1,3 3,3 4,4"/>
72 <glyph id="Y1" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,3 3,3 4,4"/>
73 <glyph id="A2" d="M0,0 L2,8 L4,0 M0,4 C1,5 3,5 4,4"/>
74 <glyph id="H2" d="M0,0 V8 M4,0 V8 M0,4 C1,5 3,5 4,4"/>
75 <glyph id="P2" d="M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,5 3,5 4,4"/>
76 <glyph id="S2" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 C1,5 3,5 4,4"/>
77 <glyph id="Y2" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,5 3,5 4,4"/>
78 <glyph id="SS" unicode="SS" horiz-adv-x="6" d="M0,4 V6 C0,7 0,8 1,8 C2,8 2,7 2,6 M2,4 V2 C2,1 2,0 1,0 C0,0 0,1 0,2 M3,4 V6 C3,7 3,8 4,8 C5,8 5,7 5,6 M5,4 V2 C5,1 5,0 4,0 C3,0 3,1 3,2 M0,4 H5"/>
79 <glyph id="A" unicode="A" d="M0,0 L2,8 L4,0 M0,4 H4"/>
80 <glyph id="D" unicode="D" d="M0,0 V8 C3,8 4,7 4,4 C4,1 3,0 0,0z"/>
81 <glyph id="S" unicode="S" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 H4"/>
82 <glyph id="Y" unicode="Y" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 H4"/>
83 </font>
84 <altGlyphDef id="Afrown">
85 <glyphRef xlink:href="#A2"/>
86 </altGlyphDef>
87 <altGlyphDef id="Asmile">
88 <glyphRef xlink:href="#A1"/>
89 </altGlyphDef>
90 <altGlyphDef id="Hsmile">
91 <glyphRef xlink:href="#H1"/>
92 </altGlyphDef>
93 <altGlyphDef id="Psmile">
94 <glyphRef xlink:href="#P1"/>
95 </altGlyphDef>
96 <altGlyphDef id="Sfrown">
97 <glyphRef xlink:href="#S2"/>
98 </altGlyphDef>
99 <altGlyphDef id="Ysmile">
100 <glyphRef xlink:href="#Y1"/>
101 </altGlyphDef>
102 </defs>
103 <g font-family="HappySad" font-size="60" fill="none" stroke-width="5">
104 <text x="140" y="190" stroke="fuchsia">
105 <altGlyph xlink:href="#Hsmile">H</altGlyph>
106 <altGlyph xlink:href="#Asmile">A</altGlyph>
107 <altGlyph xlink:href="#Psmile">P</altGlyph>
108 <altGlyph xlink:href="#Psmile">P</altGlyph>
109 <altGlyph xlink:href="#Ysmile">Y</altGlyph>
110 </text>
111 <text x="50" y="270" stroke="green">
112 <altGlyph xlink:href="#Sfrown">S</altGlyph><altGlyph xlink:href="#Afrown">A</altGlyph>D
113 </text>
114 <text x="280" y="270" stroke="blue">SASSY</text>
115 </g>
116 </g>
117 </g>
118 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
119 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
120 </g>
121 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
122 <!-- comment out this watermark once the test is approved -->
123 <!--<g id="draft-watermark">
124 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
125 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
126 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
127 </g>-->
128 </svg>