| 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 text on a path --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ========================================================================= --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 32 |
<title>Text on a path with spaces test</title> |
| 33 |
|
| 34 |
<g id="content"> |
| 35 |
|
| 36 |
<text class="title" x="50%" y="40">Text on a path with adjusted spacing</text> |
| 37 |
|
| 38 |
<defs> |
| 39 |
<path id="Path1" style="fill:none; stroke:blue;" transform="scale(0.15,0.15)" |
| 40 |
d="M 100 200 C 200 100 300 0 400 100 C 500 200 600 300 700 200 C 800 100 900 100 900 100"/> |
| 41 |
<path id="Path2" style="fill:none; stroke:blue;" transform="scale(0.30,0.50)" |
| 42 |
d="M 100 100 C100 0 400 00 400 100"/> |
| 43 |
|
| 44 |
</defs> |
| 45 |
|
| 46 |
|
| 47 |
<g transform="translate(0,70)"> |
| 48 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 49 |
<text font-size="20"> |
| 50 |
<textPath xlink:href="#Path1"><tspan>sample</tspan></textPath> |
| 51 |
</text> |
| 52 |
<text font-size="10" x="35" y="60">default spacing</text> |
| 53 |
</g> |
| 54 |
|
| 55 |
<g transform="translate(150,70)"> |
| 56 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 57 |
<text font-size="20"> |
| 58 |
<textPath xlink:href="#Path1"><tspan x="10,30,50,75,95,110" y="110">sample</tspan></textPath> |
| 59 |
</text> |
| 60 |
<text font-size="10" x="15" y="60">tspan x="10,30,50,75,95,110"</text> |
| 61 |
<text font-size="10" x="35" y="70">y="110"</text> |
| 62 |
</g> |
| 63 |
|
| 64 |
<g transform="translate(300,70)"> |
| 65 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 66 |
<text font-size="20"> |
| 67 |
<textPath xlink:href="#Path1"><tspan dx="0,10,10,10,10,10">sample</tspan></textPath> |
| 68 |
</text> |
| 69 |
<text font-size="10" x="15" y="60">tspan dx="0,10,10,10,10,10"</text> |
| 70 |
</g> |
| 71 |
|
| 72 |
|
| 73 |
<g transform="translate(0,160)"> |
| 74 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 75 |
<text font-size="20"> |
| 76 |
<textPath xlink:href="#Path1" textLength="140">sample</textPath> |
| 77 |
</text> |
| 78 |
<text font-size="10" x="35" y="60">textLength="140"</text> |
| 79 |
</g> |
| 80 |
|
| 81 |
|
| 82 |
<g transform="translate(150,160)"> |
| 83 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 84 |
<text font-size="20"> |
| 85 |
<textPath xlink:href="#Path1" textLength="70">sample</textPath> |
| 86 |
</text> |
| 87 |
<text font-size="10" x="35" y="60">textLength="70"</text> |
| 88 |
</g> |
| 89 |
|
| 90 |
<g transform="translate(300,160)"> |
| 91 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 92 |
<text font-size="20"> |
| 93 |
<textPath xlink:href="#Path1" kerning="10">sample</textPath> |
| 94 |
</text> |
| 95 |
<text font-size="10" x="35" y="60">kerning="10"</text> |
| 96 |
</g> |
| 97 |
|
| 98 |
|
| 99 |
<g transform="translate(0,250)"> |
| 100 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 101 |
<text font-size="20"> |
| 102 |
<textPath xlink:href="#Path1" textLength="140" lengthAdjust="spacingAndGlyphs">sample</textPath> |
| 103 |
</text> |
| 104 |
<text font-size="10" x="35" y="60">textLength="140"</text> |
| 105 |
<text font-size="10" x="35" y="70">lengthAdjust=</text> |
| 106 |
<text font-size="10" x="35" y="80">"spacingAndGlyphs"</text> |
| 107 |
</g> |
| 108 |
|
| 109 |
<g transform="translate(150,250)"> |
| 110 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 111 |
<text font-size="20"> |
| 112 |
<textPath xlink:href="#Path1" textLength="50" lengthAdjust="spacingAndGlyphs">sample</textPath> |
| 113 |
</text> |
| 114 |
<text font-size="10" x="35" y="60">textLength="50"</text> |
| 115 |
<text font-size="10" x="35" y="70">lengthAdjust=</text> |
| 116 |
<text font-size="10" x="35" y="80">"spacingAndGlyphs"</text> |
| 117 |
</g> |
| 118 |
|
| 119 |
<g transform="translate(300,250)"> |
| 120 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 121 |
<text font-size="20"> |
| 122 |
<textPath xlink:href="#Path1" textLength="140" lengthAdjust="spacingAndGlyphs" kerning="10">sample</textPath> |
| 123 |
</text> |
| 124 |
<text font-size="10" x="5" y="60">textLength="140", kerning="10"</text> |
| 125 |
<text font-size="10" x="5" y="70">lengthAdjust=</text> |
| 126 |
<text font-size="10" x="5" y="80">"spacingAndGlyphs"</text> |
| 127 |
</g> |
| 128 |
|
| 129 |
<g transform="translate(0,350)"> |
| 130 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 131 |
<text font-size="20"> |
| 132 |
<textPath xlink:href="#Path1" letter-spacing="-3">sample</textPath> |
| 133 |
</text> |
| 134 |
<text font-size="10" x="35" y="60">letter-spacing="-3"</text> |
| 135 |
</g> |
| 136 |
|
| 137 |
<g transform="translate(150,350)"> |
| 138 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 139 |
<text font-size="20"> |
| 140 |
<textPath xlink:href="#Path1" textLength="140" word-spacing="2em">sample sample</textPath> |
| 141 |
</text> |
| 142 |
<text font-size="10" x="35" y="60">textLength="140"</text> |
| 143 |
<text font-size="10" x="35" y="70">word-spacing="2em"</text> |
| 144 |
</g> |
| 145 |
|
| 146 |
<g transform="translate(300,350)"> |
| 147 |
<use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 148 |
<text font-size="20"> |
| 149 |
<textPath xlink:href="#Path1" textLength="140" lengthAdjust="spacingAndGlyphs" word-spacing="-5">sample sample</textPath> |
| 150 |
</text> |
| 151 |
<text font-size="10" x="35" y="60">textLength="140"</text> |
| 152 |
<text font-size="10" x="35" y="70">word-spacing="-5"</text> |
| 153 |
<text font-size="10" x="35" y="80">lengthAdjust=</text> |
| 154 |
<text font-size="10" x="35" y="90">"spacingAndGlyphs"</text> |
| 155 |
</g> |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
</g> |
| 162 |
|
| 163 |
<!-- ============================================================= --> |
| 164 |
<!-- Batik sample mark --> |
| 165 |
<!-- ============================================================= --> |
| 166 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 167 |
|
| 168 |
</svg> |
| 169 |
|