blob: bf10d740ee1bbd5f6959f7f677f97cc43197c011 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-altGlyph-BE-07.svg -->
<!-- renamed for 1.1 suite to text-altglyph-01-f.svg -->
<!-- -->
<!-- Test 'altGlyph' facilities and many-to-many chars to glyphs. -->
<!-- -->
<!-- Author : Jon Ferraiolo 05-Aug-2000 -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 05-Aug-2000, JF: Serial#1 created. -->
<!-- 30-Oct-2000, JF: Fix many, many bugs in test case. -->
<!-- Update baseline names to match new spec. -->
<!-- Update to serial#=2. -->
<!-- 07-Dec-2000, JF: Pretty formatted broke the test by introducing -->
<!-- undesirable white space. I removed the white space. -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript>
<Paragraph>
Test 'altGlyph' facilities and many-to-many chars to glyphs.
</Paragraph>
<Paragraph>
Three text strings show: the word "HAPPY" in red, the word "SAD" in green
and the word "SASSY" in blue.
</Paragraph>
<Paragraph>
The "HAPPY" and "SAD" strings test the 'altGlyph' facility and
the ability to map multiple glyphs to a single character.
All characters except the "D" are bracketed by 'altGlyph' elements
to use two different glyphs to render each character.
For "HAPPY", the horizontal stroke through the center of the characters
is a smile stroke.
For "SAD", the horizontal stroke through the center of the characters
is a frown stroke.
</Paragraph>
<Paragraph>
The "SASSY" string tests a single glyph representing multiple characters
(a ligature). The SVG font in the test case contains an "SS" ligature
so that the "SS" in "SASSY" is rendered with a single glyph, where
the two parts of the "SS" are connected.
</Paragraph>
<Paragraph>
This test requires some support for SVG fonts.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-altglyph-01-f</title>
<desc id="test-desc">Test 'altGlyph' facilities and many-to-many chars to glyphs.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content" stroke-miterlimit="4" >
<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>
<defs>
<!-- START OF ACTUAL TEST CASE CODE, which is active -->
<font id="Font1" horiz-adv-x="5">
<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">
<font-face-src>
<font-face-name name="HappySad"/>
</font-face-src>
</font-face>
<missing-glyph>
<path d="M1,3h2v2h-2z"/>
</missing-glyph>
<glyph id="A1" d="M0,0 L2,8 L4,0 M0,4 C1,3 3,3 4,4"/>
<glyph id="H1" d="M0,0 V8 M4,0 V8 M0,4 C1,3 3,3 4,4"/>
<glyph id="P1" d="M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,3 3,3 4,4"/>
<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"/>
<glyph id="Y1" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,3 3,3 4,4"/>
<glyph id="A2" d="M0,0 L2,8 L4,0 M0,4 C1,5 3,5 4,4"/>
<glyph id="H2" d="M0,0 V8 M4,0 V8 M0,4 C1,5 3,5 4,4"/>
<glyph id="P2" d="M0,0 V8 H2 C3,8 4,7 4,6 V4 M0,4 C1,5 3,5 4,4"/>
<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"/>
<glyph id="Y2" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 C1,5 3,5 4,4"/>
<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 "/>
<glyph id="A" unicode="A" d="M0,0 L2,8 L4,0 M0,4 H4"/>
<glyph id="D" unicode="D" d="M0,0 V8 C3,8 4,7 4,4 C4,1 3,0 0,0z"/>
<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"/>
<glyph id="Y" unicode="Y" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 H4"/>
</font>
<altGlyphDef id="Afrown">
<glyphRef xlink:href="#A2"/>
</altGlyphDef>
<altGlyphDef id="Asmile">
<glyphRef xlink:href="#A1"/>
</altGlyphDef>
<altGlyphDef id="Hsmile">
<glyphRef xlink:href="#H1"/>
</altGlyphDef>
<altGlyphDef id="Psmile">
<glyphRef xlink:href="#P1"/>
</altGlyphDef>
<altGlyphDef id="Sfrown">
<glyphRef xlink:href="#S2"/>
</altGlyphDef>
<altGlyphDef id="Ysmile">
<glyphRef xlink:href="#Y1"/>
</altGlyphDef>
<!-- END OF ACTUAL TEST CASE CODE, which is active -->
<!-- START OF PATCH CODE, which is commented out
<path id="Abasepath" d="M0,0 L2,8 L4,0"/>
<path id="Dpath" d="M0,0 V8 C3,8 4,7 4,4 C4,1 3,0 0,0z"/>
<path id="Hbasepath" d="M0,0 V8 M4,0 V8"/>
<path id="Pbasepath" d="M0,0 V8 H2 C3,8 4,7 4,6 V4"/>
<path id="Sbasepath" 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"/>
<path id="Ybasepath" d="M0,8 V4 M4,8 V4 M2,4 V0"/>
<path id="frownpath" d="M-5,4 C-4,5 -2,5 -1,4"/>
<path id="smilepath" d="M-5,4 C-4,3 -2,3 -1,4"/>
<path id="SSpath" 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
"/>
<path id="Apath" d="M0,0 L2,8 L4,0 M0,4 H4"/>
<path id="Spath" 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"/>
<path id="Ypath" d="M0,8 V4 M4,8 V4 M2,4 V0 M0,4 H4"/>
END OF PATCH CODE, which is commented out -->
</defs>
<!-- START OF ACTUAL TEST CASE CODE, which is active -->
<g font-family="HappySad" font-size="60" fill="none" stroke-width="5" >
<text x="50" y="120" stroke="red" >
<altGlyph xlink:href="#Hsmile">H</altGlyph>
<altGlyph xlink:href="#Asmile">A</altGlyph>
<altGlyph xlink:href="#Psmile">P</altGlyph>
<altGlyph xlink:href="#Psmile">P</altGlyph>
<altGlyph xlink:href="#Ysmile">Y</altGlyph>
</text>
<text x="50" y="200" stroke="green" ><altGlyph xlink:href="#Sfrown">S</altGlyph><altGlyph xlink:href="#Afrown">A</altGlyph>D</text>
<text x="50" y="280" stroke="blue" >SASSY</text>
</g>
<!-- END OF ACTUAL TEST CASE CODE, which is active. -->
<!-- START OF PATCH CODE, which is commented out
<g fill="none" stroke-width=".5" stroke-miterlimit="1" >
<g transform="translate(100, 150) scale(10) matrix(1 0 0 -1 0 0)"
stroke="red" >
<use x="0" xlink:href="#Hbasepath"/>
<use x="5" xlink:href="#smilepath"/>
<use x="5" xlink:href="#Abasepath"/>
<use x="10" xlink:href="#smilepath"/>
<use x="10" xlink:href="#Pbasepath"/>
<use x="15" xlink:href="#smilepath"/>
<use x="15" xlink:href="#Pbasepath"/>
<use x="20" xlink:href="#smilepath"/>
<use x="20" xlink:href="#Ybasepath"/>
<use x="25" xlink:href="#smilepath"/>
</g>
<g transform="translate(100, 250) scale(10) matrix(1 0 0 -1 0 0)"
stroke="green" >
<use x="0" xlink:href="#Sbasepath"/>
<use x="5" xlink:href="#frownpath"/>
<use x="5" xlink:href="#Abasepath"/>
<use x="10" xlink:href="#frownpath"/>
<use x="10" xlink:href="#Dpath"/>
</g>
<g transform="translate(100, 350) scale(10) matrix(1 0 0 -1 0 0)"
stroke="blue" >
<use x="0" xlink:href="#Spath"/>
<use x="5" xlink:href="#Apath"/>
<use x="10" xlink:href="#SSpath"/>
<use x="16" xlink:href="#Ypath"/>
</g>
</g>
END OF PATCH CODE, which is commented out -->
</g>
<!--======================================================================-->
<!--Legend and frame: Title, suite and SVG document serialization====-->
<!--======================================================================-->
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
<a xlink:href="copyright-documents-19990405.html">
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
</a>
<text font-size="12" x="35" y="330">text-altglyph-01-f</text>
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
<text font-size="10" x="210" y="345">Release 1.0</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
</g>
</svg>