| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| 3 |
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
|
| 7 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 |
contributor license agreements. See the NOTICE file distributed with |
| 9 |
this work for additional information regarding copyright ownership. |
| 10 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 11 |
(the "License"); you may not use this file except in compliance with |
| 12 |
the License. You may obtain a copy of the License at |
| 13 |
|
| 14 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 15 |
|
| 16 |
Unless required by applicable law or agreed to in writing, software |
| 17 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 18 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 |
See the License for the specific language governing permissions and |
| 20 |
limitations under the License. |
| 21 |
|
| 22 |
--> |
| 23 |
<!-- ========================================================================= --> |
| 24 |
<!-- Tests various altGlyph uses --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ========================================================================= --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg width="450" height="500" viewBox="0 0 450 500" font-family="Arial" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 32 |
<title>altGlyph, altGlyphItem</title> |
| 33 |
|
| 34 |
<g id="content"> |
| 35 |
|
| 36 |
<text class="title" x="50%" y="40">altGlyph, altGlyphItem Test</text> |
| 37 |
|
| 38 |
<defs> |
| 39 |
<font id="Font1" horiz-adv-x="1000"> |
| 40 |
<font-face font-family="Super Sans" units-per-em="1000" cap-height="600" x-height="400" ascent="700" descent="300" alphabetic="0" mathematical="350" ideographic="400" hanging="500"> |
| 41 |
<font-face-src> |
| 42 |
<font-face-name name="Super Sans Bold"/> |
| 43 |
</font-face-src> |
| 44 |
</font-face> |
| 45 |
<missing-glyph d="M0,0h200v200h-200z"/> |
| 46 |
<glyph id="MyA" unicode="A" horiz-adv-x="500" d="M0,0v500h400v-500h-100v200h-200v-200zM100,300h200v100h-200z"/> |
| 47 |
<glyph id="MyB" unicode="B" horiz-adv-x="500" d="M0,0h300v100h-200v100h200v100h-200v100h200v100h-300zM300,100h100v100h-100zM300,300h100v100h-100z"/> |
| 48 |
<glyph id="MyC" unicode="C" horiz-adv-x="500" d="M0,0h400v100h-300v300h300v100h-400z"/> |
| 49 |
<glyph id="MyD" unicode="D" horiz-adv-x="500" d="M0,0h300v100h-200v300h200v100h-300zM300,100h100v300h-100z"/> |
| 50 |
<glyph id="MyE" unicode="E" horiz-adv-x="500" d="M0,0h400v100h-300v100h200v100h-200v100h300v100h-400z"/> |
| 51 |
</font> |
| 52 |
<altGlyphDef id="MyAltGlyphDef1"> |
| 53 |
<glyphRef xlink:href="#MyA"/> |
| 54 |
<glyphRef xlink:href="#MyB"/> |
| 55 |
<glyphRef xlink:href="#MyC"/> |
| 56 |
<glyphRef xlink:href="#MyD"/> |
| 57 |
<glyphRef xlink:href="#MyE"/> |
| 58 |
</altGlyphDef> |
| 59 |
<altGlyphDef id="MyAltGlyphDef2"> |
| 60 |
<glyphRef xlink:href="#MyA"/> |
| 61 |
<glyphRef xlink:href="#NoSuchId"/> |
| 62 |
<glyphRef xlink:href="#MyC"/> |
| 63 |
<glyphRef xlink:href="#MyD"/> |
| 64 |
<glyphRef xlink:href="#MyE"/> |
| 65 |
</altGlyphDef> |
| 66 |
<altGlyphDef id="MyAltGlyphDef3"> |
| 67 |
<altGlyphItem> |
| 68 |
<glyphRef xlink:href="#MyA"/> |
| 69 |
<glyphRef xlink:href="#MyA"/> |
| 70 |
<glyphRef xlink:href="#MyA"/> |
| 71 |
<glyphRef xlink:href="#MyA"/> |
| 72 |
<glyphRef xlink:href="#MyA"/> |
| 73 |
</altGlyphItem> |
| 74 |
<altGlyphItem> |
| 75 |
<glyphRef xlink:href="#MyB"/> |
| 76 |
<glyphRef xlink:href="#MyB"/> |
| 77 |
<glyphRef xlink:href="#MyB"/> |
| 78 |
<glyphRef xlink:href="#MyB"/> |
| 79 |
<glyphRef xlink:href="#MyB"/> |
| 80 |
</altGlyphItem> |
| 81 |
</altGlyphDef> |
| 82 |
<altGlyphDef id="MyAltGlyphDef4"> |
| 83 |
<altGlyphItem> |
| 84 |
<glyphRef xlink:href="#MyA"/> |
| 85 |
<glyphRef xlink:href="#NoSuchId"/> |
| 86 |
<glyphRef xlink:href="#MyA"/> |
| 87 |
</altGlyphItem> |
| 88 |
<altGlyphItem> |
| 89 |
<glyphRef xlink:href="#MyB"/> |
| 90 |
<glyphRef xlink:href="#MyB"/> |
| 91 |
<glyphRef xlink:href="#MyB"/> |
| 92 |
<glyphRef xlink:href="#MyB"/> |
| 93 |
<glyphRef xlink:href="#MyB"/> |
| 94 |
</altGlyphItem> |
| 95 |
</altGlyphDef> |
| 96 |
<altGlyphDef id="MyAltGlyphDef5"> |
| 97 |
<altGlyphItem> |
| 98 |
<glyphRef xlink:href="#MyA"/> |
| 99 |
<glyphRef xlink:href="#NoSuchId"/> |
| 100 |
<glyphRef xlink:href="#MyA"/> |
| 101 |
</altGlyphItem> |
| 102 |
<altGlyphItem> |
| 103 |
<glyphRef xlink:href="#MyB"/> |
| 104 |
<glyphRef xlink:href="#MyB"/> |
| 105 |
<glyphRef xlink:href="#NoSuchId"/> |
| 106 |
</altGlyphItem> |
| 107 |
</altGlyphDef> |
| 108 |
</defs> |
| 109 |
|
| 110 |
<g id="test-body-content" font-family="sans-serif" > |
| 111 |
<text fill="blue" x="5" y="20%">altGlyph referencing a unique glyph...</text> |
| 112 |
<text x="5" y="23%">...which is valid : " |
| 113 |
<altGlyph fill="green" xlink:href="#MyE">No Match</altGlyph> |
| 114 |
" </text> |
| 115 |
<text x="5" y="26%">...which has an |
| 116 |
<tspan fill="red">invalid</tspan> |
| 117 |
id : " <altGlyph fill="red" xlink:href="#NoSuchID">No Match</altGlyph> |
| 118 |
" </text> |
| 119 |
<text x="5" y="29%">...which is |
| 120 |
<tspan fill="red">not</tspan> |
| 121 |
an actual glyph : " <altGlyph fill="red" xlink:href="#Font1">No Match</altGlyph> |
| 122 |
" </text> |
| 123 |
<text fill="blue" x="5" y="40%">altGlyph referencing a glyphDef containing...</text> |
| 124 |
<text x="5" y="43%">...5 valid glyphRefs : " |
| 125 |
<altGlyph fill="green" xlink:href="#MyAltGlyphDef1">No Match</altGlyph> |
| 126 |
" </text> |
| 127 |
<text x="5" y="46%">...4 valid and an |
| 128 |
<tspan fill="red">invalid</tspan> |
| 129 |
glyphRefs : " <altGlyph fill="red" xlink:href="#MyAltGlyphDef2">No Match</altGlyph> |
| 130 |
" </text> |
| 131 |
<text x="5" y="49%">...2 altGlyphItems (both valid) : " |
| 132 |
<altGlyph fill="green" xlink:href="#MyAltGlyphDef3">No Match</altGlyph> |
| 133 |
" </text> |
| 134 |
<text x="5" y="52%">...2 altGlyphItems (2nd is valid) : " |
| 135 |
<altGlyph fill="green" xlink:href="#MyAltGlyphDef4">No Match</altGlyph> |
| 136 |
" </text> |
| 137 |
<text x="5" y="55%">...2 altGlyphItems (both |
| 138 |
<tspan fill="red">invalid</tspan> |
| 139 |
) : " <altGlyph fill="red" xlink:href="#MyAltGlyphDef5">No Match</altGlyph> |
| 140 |
" </text> |
| 141 |
<text x="5" y="58%">...5 glyphRefs with dx/dy/rotate : " |
| 142 |
<altGlyph rotate="10,10,10,10,10" dx="0,2,2,2,2" dy="0,2,2,-2,-2" fill="green" xlink:href="#MyAltGlyphDef1">No Match</altGlyph> |
| 143 |
" </text> |
| 144 |
</g> |
| 145 |
</g> |
| 146 |
</svg> |