Debian Codegraph @

samples/tests/spec/text/verticalTextOnPath.svg

raw
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 Licensed to the Apache Software Foundation (ASF) under one or more
7 contributor license agreements. See the NOTICE file distributed with
8 this work for additional information regarding copyright ownership.
9 The ASF licenses this file to You under the Apache License, Version 2.0
10 (the "License"); you may not use this file except in compliance with
11 the License. You may obtain a copy of the License at
12
13 http://www.apache.org/licenses/LICENSE-2.0
14
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 -->
21
22 <!-- ========================================================================= -->
23 <!-- Tests vertical text on a path -->
24 <!-- -->
25 <!-- @author [email protected] -->
26 <!-- @version $Id$ -->
27 <!-- ========================================================================= -->
28 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
29
30 <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">
31 <title>Vertical text on a path test</title>
32
33 <g id="content">
34
35 <text class="title" x="50%" y="40">Vertical text on a path test</text>
36
37 <defs>
38 <path id="Path1" style="fill:none; stroke:blue;" transform="scale(0.15,0.15)"
39 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"/>
40 <path id="Path2" style="fill:none; stroke:blue;" transform="scale(0.30,0.50)"
41 d="M 100 100 C100 0 400 00 400 100"/>
42
43 </defs>
44
45 <g transform="translate(0,70)">
46 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
47 <text font-size="15" style="text-anchor:start" writing-mode="tb" glyph-orientation-vertical="auto">
48 <textPath xlink:href="#Path1" startOffset="0%">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
49 </text>
50 <text font-size="10" x="35" y="60">startOffset="0%"</text>
51 <text font-size="10" x="35" y="70">text-anchor="start"</text>
52 <text font-size="10" x="35" y="80">glyph-orientation="auto"</text>
53 </g>
54
55
56 <g transform="translate(150,70)">
57 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
58 <text font-size="15" style="text-anchor:middle" writing-mode="tb" glyph-orientation-vertical="0deg">
59 <textPath xlink:href="#Path1" startOffset="0%">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
60 </text>
61 <text font-size="10" x="35" y="60">startOffset="0%"</text>
62 <text font-size="10" x="35" y="70">text-anchor="middle"</text>
63 <text font-size="10" x="35" y="80">glyph-orientation="0deg"</text>
64 </g>
65
66 <g transform="translate(300,70)">
67 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
68 <text font-size="15" style="text-anchor:end" writing-mode="tb" glyph-orientation-vertical="180deg">
69 <textPath xlink:href="#Path1" startOffset="50%">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
70 </text>
71 <text font-size="10" x="35" y="60">startOffset="50%"</text>
72 <text font-size="10" x="35" y="70">text-anchor="end"</text>
73 <text font-size="10" x="35" y="80">glyph-orientation="180deg"</text>
74 </g>
75
76
77 <g transform="translate(0,170)">
78 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
79 <text font-size="15" style="text-anchor:start" writing-mode="tb" glyph-orientation-vertical="270deg">
80 <textPath xlink:href="#Path1" startOffset="50%">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
81 </text>
82 <text font-size="10" x="35" y="60">startOffset="50%"</text>
83 <text font-size="10" x="35" y="70">text-anchor="start"</text>
84 <text font-size="10" x="35" y="80">glyph-orientation="270deg"</text>
85 </g>
86
87
88 <g transform="translate(150,170)">
89 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
90 <text font-size="15" style="text-anchor:middle" writing-mode="tb" glyph-orientation-vertical="0deg">
91 <textPath xlink:href="#Path1" startOffset="50%">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
92 </text>
93 <text font-size="10" x="35" y="60">startOffset="50%"</text>
94 <text font-size="10" x="35" y="70">text-anchor="middle"</text>
95 <text font-size="10" x="35" y="80">glyph-orientation="0deg"</text>
96 </g>
97
98 <g transform="translate(300,170)">
99 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
100 <text font-size="15" style="text-anchor:end" writing-mode="tb" glyph-orientation-vertical="90deg">
101 <textPath xlink:href="#Path1" startOffset="100%">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
102 </text>
103 <text font-size="10" x="35" y="60">startOffset="100%"</text>
104 <text font-size="10" x="35" y="70">text-anchor="end"</text>
105 <text font-size="10" x="35" y="80">glyph-orientation="90deg"</text>
106 </g>
107
108
109 <g transform="translate(0,270)">
110 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
111 <text font-size="15" style="text-anchor:start" writing-mode="tb" glyph-orientation-vertical="180deg">
112 <textPath xlink:href="#Path1" startOffset="35">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
113 </text>
114 <text font-size="10" x="35" y="60">startOffset="35"</text>
115 <text font-size="10" x="35" y="70">text-anchor="start"</text>
116 <text font-size="10" x="35" y="80">glyph-orientation="180deg"</text>
117 </g>
118
119
120 <g transform="translate(150,270)">
121 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
122 <text font-size="15" style="text-anchor:middle" writing-mode="tb" glyph-orientation-vertical="270deg">
123 <textPath xlink:href="#Path1" startOffset="35">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
124 </text>
125 <text font-size="10" x="35" y="60">startOffset="35"</text>
126 <text font-size="10" x="35" y="70">text-anchor="middle"</text>
127 </g>
128
129 <g transform="translate(300,270)">
130 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
131 <text font-size="15" style="text-anchor:end" writing-mode="tb" glyph-orientation-vertical="90deg">
132 <textPath xlink:href="#Path1" startOffset="35">Text <tspan fill="red" dx="10">on</tspan><tspan dx="-10"> a Path</tspan></textPath>
133 </text>
134 <text font-size="10" x="35" y="60">startOffset="35"</text>
135 <text font-size="10" x="35" y="70">text-anchor="end"</text>
136 <text font-size="10" x="35" y="80">glyph-orientation="90deg"</text>
137 </g>
138
139
140
141 <g transform="translate(10,370)">
142 <use xlink:href="#Path2" style="fill:none; stroke:blue; stroke-width:2"/>
143 <text id="supersub" font-size="15" writing-mode="tb"
144 glyph-orientation-vertical="auto">
145 <textPath xlink:href="#Path2"><tspan baseline-shift="super" fill="green">super</tspan> and <tspan baseline-shift="sub" fill="red">sub</tspan>scripts</textPath>
146 </text>
147 <text font-size="10" x="20" y="65">baseline-shift="super"</text>
148 <text font-size="10" x="20" y="75">and baseline-shift="sub"</text>
149 <text font-size="10" x="20" y="85">glyph-orientation="auto"</text>
150 </g>
151
152
153 <g transform="translate(300,370)">
154 <use xlink:href="#Path2" style="fill:none; stroke:blue; stroke-width:2"/>
155 <text id="negpos" font-size="15" writing-mode="tb"
156 glyph-orientation-vertical="auto">
157 <textPath xlink:href="#Path2"><tspan baseline-shift="+20%" fill="green">positive</tspan> and <tspan baseline-shift="-20%" fill="red">negative </tspan></textPath>
158 </text>
159 <text font-size="10" x="20" y="65">baseline-shift="+/-20%"</text>
160 <text font-size="10" x="20" y="75">glyph-orientation="auto"</text>
161 </g>
162
163 <g transform="translate(180,370)">
164 <g transform="scale(0.75)">
165 <use xlink:href="#Path2" style="fill:none; stroke:blue; stroke-width:2"/>
166 <text id="beforeafter" font-size="20" x="10" y="-20"
167 writing-mode="tb" glyph-orientation-vertical="auto">before path
168 <textPath xlink:href="#Path2" fill="red" startOffset="10%">on path</textPath>after path
169 </text>
170 </g>
171 <text font-size="10" x="0" y="100">text before/after textPath</text>
172 <text font-size="10" x="0" y="110">glyph-orientation="auto"</text>
173 </g>
174
175 </g>
176
177 <!-- ============================================================= -->
178 <!-- Batik sample mark -->
179 <!-- ============================================================= -->
180 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
181
182 </svg>
183