1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4 <!--======================================================================-->
5 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, Institut National de Recherche en =-->
7 <!--= Informatique et en Automatique, Keio University). All Rights =-->
8 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
9 <!--======================================================================-->
10 <!-- ===================================================================== -->
12 <!-- text-altGlyph-BE-07.svg -->
13 <!-- renamed for 1.1 suite to text-altglyph-01-f.svg -->
15 <!-- Test 'altGlyph' facilities and many-to-many chars to glyphs. -->
17 <!-- Author : Jon Ferraiolo 05-Aug-2000 -->
18 <!-- 1.1 revision by Vincent Hardy -->
21 <!-- 05-Aug-2000, JF: Serial#1 created. -->
22 <!-- 30-Oct-2000, JF: Fix many, many bugs in test case. -->
23 <!-- Update baseline names to match new spec. -->
24 <!-- Update to serial#=2. -->
25 <!-- 07-Dec-2000, JF: Pretty formatted broke the test by introducing -->
26 <!-- undesirable white space. I removed the white space. -->
28 <!-- ===================================================================== -->
29 <!--======================================================================-->
30 <!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
31 <!--= log messages, and therefore is no longer in the preceding preamble.=-->
32 <!--======================================================================-->
33 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" id=
"svg-root" width=
"480" height=
"360">
34 <SVGTestCase xmlns=
"http://www.w3.org/2000/02/svg/testsuite/description/">
37 Test 'altGlyph' facilities and many-to-many chars to glyphs.
40 Three text strings show: the word
"HAPPY" in red, the word
"SAD" in green
41 and the word
"SASSY" in blue.
44 The
"HAPPY" and
"SAD" strings test the 'altGlyph' facility and
45 the ability to map multiple glyphs to a single character.
46 All characters except the
"D" are bracketed by 'altGlyph' elements
47 to use two different glyphs to render each character.
48 For
"HAPPY", the horizontal stroke through the center of the characters
50 For
"SAD", the horizontal stroke through the center of the characters
54 The
"SASSY" string tests a single glyph representing multiple characters
55 (a ligature). The SVG font in the test case contains an
"SS" ligature
56 so that the
"SS" in
"SASSY" is rendered with a single glyph, where
57 the two parts of the
"SS" are connected.
60 This test requires some support for SVG fonts.
65 <title id=
"test-title">text-altglyph-
01-f
</title>
66 <desc id=
"test-desc">Test 'altGlyph' facilities and many-to-many chars to glyphs.
</desc>
67 <!--======================================================================-->
68 <!--Content of Test Case follows... =====================-->
69 <!--======================================================================-->
70 <g id=
"test-body-content" stroke-miterlimit=
"4" >
71 <text font-family=
"Helvetica" font-size=
"14" text-anchor=
"middle" x=
"225" y=
"30">Test 'altGlyph' facilities and many-to-many chars to glyphs
</text>
73 <!-- START OF ACTUAL TEST CASE CODE, which is active -->
74 <font id=
"Font1" horiz-adv-x=
"5">
75 <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">
77 <font-face-name name=
"HappySad"/>
81 <path d=
"M1,3h2v2h-2z"/>
83 <glyph id=
"A1" d=
"M0,0 L2,8 L4,0 M0,4 C1,3 3,3 4,4"/>
84 <glyph id=
"H1" d=
"M0,0 V8 M4,0 V8 M0,4 C1,3 3,3 4,4"/>
85 <glyph id=
"P1" d=
"M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,3 3,3 4,4"/>
86 <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"/>
87 <glyph id=
"Y1" d=
"M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,3 3,3 4,4"/>
88 <glyph id=
"A2" d=
"M0,0 L2,8 L4,0 M0,4 C1,5 3,5 4,4"/>
89 <glyph id=
"H2" d=
"M0,0 V8 M4,0 V8 M0,4 C1,5 3,5 4,4"/>
90 <glyph id=
"P2" d=
"M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,5 3,5 4,4"/>
91 <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"/>
92 <glyph id=
"Y2" d=
"M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,5 3,5 4,4"/>
93 <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 "/>
94 <glyph id=
"A" unicode=
"A" d=
"M0,0 L2,8 L4,0 M0,4 H4"/>
95 <glyph id=
"D" unicode=
"D" d=
"M0,0 V8 C3,8 4,7 4,4 C4,1 3,0 0,0z"/>
96 <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"/>
97 <glyph id=
"Y" unicode=
"Y" d=
"M0,8 V4 M4,8 V4 M2,4 V0 M0,4 H4"/>
99 <altGlyphDef id=
"Afrown">
100 <glyphRef xlink:
href=
"#A2"/>
102 <altGlyphDef id=
"Asmile">
103 <glyphRef xlink:
href=
"#A1"/>
105 <altGlyphDef id=
"Hsmile">
106 <glyphRef xlink:
href=
"#H1"/>
108 <altGlyphDef id=
"Psmile">
109 <glyphRef xlink:
href=
"#P1"/>
111 <altGlyphDef id=
"Sfrown">
112 <glyphRef xlink:
href=
"#S2"/>
114 <altGlyphDef id=
"Ysmile">
115 <glyphRef xlink:
href=
"#Y1"/>
117 <!-- END OF ACTUAL TEST CASE CODE, which is active -->
118 <!-- START OF PATCH CODE, which is commented out
119 <path id="Abasepath" d="M0,0 L2,8 L4,0"/>
120 <path id="Dpath" d="M0,0 V8 C3,8 4,7 4,4 C4,1 3,0 0,0z"/>
121 <path id="Hbasepath" d="M0,0 V8 M4,0 V8"/>
122 <path id="Pbasepath" d="M0,0 V8 H2 C3,8 4,7 4,6 V4"/>
123 <path id="Sbasepath" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6
124 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2"/>
125 <path id="Ybasepath" d="M0,8 V4 M4,8 V4 M2,4 V0"/>
126 <path id="frownpath" d="M-5,4 C-4,5 -2,5 -1,4"/>
127 <path id="smilepath" d="M-5,4 C-4,3 -2,3 -1,4"/>
128 <path id="SSpath" d="
129 M0,4 V6 C0,7 0,8 1,8 C2,8 2,7 2,6
130 M2,4 V2 C2,1 2,0 1,0 C0,0 0,1 0,2
131 M3,4 V6 C3,7 3,8 4,8 C5,8 5,7 5,6
132 M5,4 V2 C5,1 5,0 4,0 C3,0 3,1 3,2
135 <path id="Apath" d="M0,0 L2,8 L4,0 M0,4 H4"/>
136 <path id="Spath" d="M0,4 V6 C0,7 1,8 2,8 C3,8 4,7 4,6
137 M4,4 V2 C4,1 3,0 2,0 C1,0 0,1 0,2 M0,4 H4"/>
138 <path id="Ypath" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 H4"/>
139 END OF PATCH CODE, which is commented out -->
141 <!-- START OF ACTUAL TEST CASE CODE, which is active -->
142 <g font-family=
"HappySad" font-size=
"60" fill=
"none" stroke-width=
"5" >
143 <text x=
"50" y=
"120" stroke=
"red" >
144 <altGlyph xlink:
href=
"#Hsmile">H
</altGlyph>
145 <altGlyph xlink:
href=
"#Asmile">A
</altGlyph>
146 <altGlyph xlink:
href=
"#Psmile">P
</altGlyph>
147 <altGlyph xlink:
href=
"#Psmile">P
</altGlyph>
148 <altGlyph xlink:
href=
"#Ysmile">Y
</altGlyph>
150 <text x=
"50" y=
"200" stroke=
"green" ><altGlyph xlink:
href=
"#Sfrown">S
</altGlyph><altGlyph xlink:
href=
"#Afrown">A
</altGlyph>D
</text>
151 <text x=
"50" y=
"280" stroke=
"blue" >SASSY
</text>
153 <!-- END OF ACTUAL TEST CASE CODE, which is active. -->
154 <!-- START OF PATCH CODE, which is commented out
155 <g fill="none" stroke-width=".5" stroke-miterlimit="1" >
156 <g transform="translate(100, 150) scale(10) matrix(1 0 0 -1 0 0)"
158 <use x="0" xlink:href="#Hbasepath"/>
159 <use x="5" xlink:href="#smilepath"/>
160 <use x="5" xlink:href="#Abasepath"/>
161 <use x="10" xlink:href="#smilepath"/>
162 <use x="10" xlink:href="#Pbasepath"/>
163 <use x="15" xlink:href="#smilepath"/>
164 <use x="15" xlink:href="#Pbasepath"/>
165 <use x="20" xlink:href="#smilepath"/>
166 <use x="20" xlink:href="#Ybasepath"/>
167 <use x="25" xlink:href="#smilepath"/>
169 <g transform="translate(100, 250) scale(10) matrix(1 0 0 -1 0 0)"
171 <use x="0" xlink:href="#Sbasepath"/>
172 <use x="5" xlink:href="#frownpath"/>
173 <use x="5" xlink:href="#Abasepath"/>
174 <use x="10" xlink:href="#frownpath"/>
175 <use x="10" xlink:href="#Dpath"/>
177 <g transform="translate(100, 350) scale(10) matrix(1 0 0 -1 0 0)"
179 <use x="0" xlink:href="#Spath"/>
180 <use x="5" xlink:href="#Apath"/>
181 <use x="10" xlink:href="#SSpath"/>
182 <use x="16" xlink:href="#Ypath"/>
185 END OF PATCH CODE, which is commented out -->
187 <!--======================================================================-->
188 <!--Legend and frame: Title, suite and SVG document serialization====-->
189 <!--======================================================================-->
190 <g id=
"test-legend" fill=
"black" font-family=
"Helvetica" font-size=
"10" >
191 <rect x=
"10" y=
"300" width=
"275" height=
"50" fill=
"none" stroke=
"#000000" />
192 <path fill=
"none" stroke=
"#000000" d=
"M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
193 <text x=
"25" y=
"311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite
</text>
194 <a xlink:
href=
"copyright-documents-19990405.html">
195 <text x=
"12" y=
"347" fill=
"blue" >Copyright
2002 W3C. All Rights Reserved.
</text>
197 <text font-size=
"12" x=
"35" y=
"330">text-altglyph-
01-f
</text>
198 <text font-size=
"10" x=
"210" y=
"327">$Revision:
1.1 $
</text>
199 <text font-size=
"10" x=
"210" y=
"345">Release
1.0</text>
200 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000000" />