Debian Codegraph @

samples/tests/spec/fonts/fontOnPath.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
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 <!-- Render some text on a path using an SVG font -->
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>SVGFont - text path test</title>
33
34 <style type="text/css"><![CDATA[
35
36 ]]></style>
37
38 <g id="content">
39
40 <text class="title" x="50%" y="40">SVG Font with textPath Test</text>
41
42 <defs>
43 <font-face font-family="SVGComic">
44 <font-face-src>
45 <font-face-uri xlink:href="fontDecorations.svg#SVGComic"/>
46 </font-face-src>
47 </font-face>
48
49 <path id="Path1" style="fill:none; stroke:blue;" transform="scale(0.15,0.15)"
50 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"/>
51 <path id="Path2" style="fill:none; stroke:blue;" transform="scale(0.30,0.50)"
52 d="M 100 100 C100 0 400 00 400 100"/>
53
54 </defs>
55
56
57 <g transform="translate(0,70)">
58 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
59 <text font-family="'SVGComic'" font-size="20" style="text-anchor:start">
60 <textPath xlink:href="#Path1" startOffset="0%">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
61 </text>
62 <text font-size="10" x="35" y="60">startOffset="0%"</text>
63 <text font-size="10" x="35" y="70">text-anchor="start"</text>
64 </g>
65
66
67 <g transform="translate(150,70)">
68 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
69 <text font-family="'SVGComic'" font-size="20" style="text-anchor:middle">
70 <textPath xlink:href="#Path1" startOffset="0%">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
71 </text>
72 <text font-size="10" x="35" y="60">startOffset="0%"</text>
73 <text font-size="10" x="35" y="70">text-anchor="middle"</text>
74 </g>
75
76 <g transform="translate(300,70)">
77 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
78 <text font-family="'SVGComic'" font-size="20" style="text-anchor:end">
79 <textPath xlink:href="#Path1" startOffset="50%">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
80 </text>
81 <text font-size="10" x="35" y="60">startOffset="50%"</text>
82 <text font-size="10" x="35" y="70">text-anchor="end"</text>
83 </g>
84
85
86 <g transform="translate(0,220)">
87 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
88 <text font-family="'SVGComic'" font-size="20" style="text-anchor:start">
89 <textPath xlink:href="#Path1" startOffset="50%">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
90 </text>
91 <text font-size="10" x="35" y="60">startOffset="50%"</text>
92 <text font-size="10" x="35" y="70">text-anchor="start"</text>
93 </g>
94
95
96 <g transform="translate(150,220)">
97 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
98 <text id="middle50" font-family="'SVGComic'"
99 font-size="20" style="text-anchor:middle">
100 <textPath xlink:href="#Path1" startOffset="50%">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
101 </text>
102 <text font-size="10" x="35" y="60">startOffset="50%"</text>
103 <text font-size="10" x="35" y="70">text-anchor="middle"</text>
104 </g>
105
106 <g transform="translate(300,220)">
107 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
108 <text font-family="'SVGComic'" font-size="20" style="text-anchor:end">
109 <textPath xlink:href="#Path1" startOffset="100%">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
110 </text>
111 <text font-size="10" x="35" y="60">startOffset="100%"</text>
112 <text font-size="10" x="35" y="70">text-anchor="end"</text>
113 </g>
114
115
116 <g transform="translate(0,370)">
117 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
118 <text id="start35" font-family="'SVGComic'"
119 font-size="20" style="text-anchor:start">
120 <textPath xlink:href="#Path1" startOffset="35">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
121 </text>
122 <text font-size="10" x="35" y="60">startOffset="35"</text>
123 <text font-size="10" x="35" y="70">text-anchor="start"</text>
124 </g>
125
126
127 <g transform="translate(150,370)">
128 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
129 <text font-family="'SVGComic'" font-size="20" style="text-anchor:middle">
130 <textPath xlink:href="#Path1" startOffset="35">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
131 </text>
132 <text font-size="10" x="35" y="60">startOffset="35"</text>
133 <text font-size="10" x="35" y="70">text-anchor="middle"</text>
134 </g>
135
136 <g transform="translate(300,370)">
137 <use xlink:href="#Path1" style="fill:none; stroke:blue; stroke-width:2"/>
138 <text font-family="'SVGComic'" font-size="20" style="text-anchor:end">
139 <textPath xlink:href="#Path1" startOffset="35">Font <tspan fill="red" dy="-10">on</tspan><tspan dy="10"> a Path</tspan></textPath>
140 </text>
141 <text font-size="10" x="35" y="60">startOffset="35"</text>
142 <text font-size="10" x="35" y="70">text-anchor="end"</text>
143 </g>
144
145 </g>
146
147 <!-- ============================================================= -->
148 <!-- Batik sample mark -->
149 <!-- ============================================================= -->
150 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
151
152 </svg>
153