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">
7 Copyright 2001-2002 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
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.
22 <!-- ========================================================================= -->
23 <!-- Test description here -->
25 <!-- @author bill.haneman@ireland.sun.com -->
26 <!-- @version $Id: textLayout2.svg,v 1.5 2004/08/18 07:12:22 vhardy Exp $ -->
27 <!-- ========================================================================= -->
28 <?xml-stylesheet type=
"text/css" href=
"../resources/test.css" ?>
29 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" width=
"450" height=
"500" viewBox=
"0 0 450 500">
30 <title>Text Layout Properties
</title>
32 <!-- ============================================================= -->
34 <!-- ============================================================= -->
37 <style type=
"text/css"><![CDATA[
38 .Caption { font-size:
8px; font-family: dialog; font-weight: normal;
39 font-style: normal; stroke: none; stroke-width:
0;
43 <style type=
"text/css"><![CDATA[
44 .SerifPlain { font-size:
24px; font-family: Serif; font-weight: normal;
45 font-style: normal; stroke: none; stroke-width:
0;
49 <text x=
"0" y=
"0" text-anchor=
"start" id=
"sample">sample
</text>
53 <g id=
"testContent" text-anchor=
"start" font-size=
"30" class=
"SerifPlain">
54 <text text-anchor=
"middle" class=
"title" x=
"50%" y=
"10%" font-size=
"15" >
55 Text Layout Properties (
2)
</text>
57 <text x=
"50%" y=
"15%" text-anchor=
"middle" font-size=
"10">Baseline Properties
</text>
59 <g text-anchor=
"middle">
60 <text x=
"225" y=
"110" font-size=
"15"><tspan baseline-shift=
"super" fill=
"blue">super
</tspan> and
<tspan baseline-shift=
"sub" fill=
"green">sub
</tspan>scripts
</text>
61 <text x=
"225" y=
"135" class=
"Caption">baseline-shift=
"super"/
baseline-shift=
"sub"</text>
64 <g text-anchor=
"middle">
65 <text x=
"225" y=
"165" font-size=
"15"><tspan baseline-shift=
"+20%" fill=
"blue">positive
</tspan> and
<tspan baseline-shift=
"-20%" fill=
"green">negative
</tspan>baseline-shift
</text>
66 <text x=
"225" y=
"180" class=
"Caption">baseline-shift=
"+/-20%"</text>
68 <text x=
"50%" y=
"42%" text-anchor=
"middle" font-size=
"10">Multi-line Text Selection
</text>
70 <text x=
"50%" y=
"45%" text-anchor=
"middle" font-size=
"7.5" font-style=
"italic">(Try selecting the following text regions)
</text>
72 <text text-anchor=
"start" font-size=
"15">
73 <tspan x=
"120" y=
"50%">Text selections can span multiple
</tspan>
74 <tspan x=
"120" y=
"53%">lines via
<tspan
> elements.
</tspan>
77 <text text-anchor=
"start" fill=
"blue" font-size=
"20" transform=
"translate(90, 360)">
78 <tspan x=
"0 10 25 50 75 90 100 90 75 50 25 10 0"
79 y=
"0 -25 -40 -50 -40 -25 0 25 40 50 40 25 10 0">Text-circle.
</tspan>
82 <text fill=
"green" font-size=
"20" transform=
"translate(250, 320)"
83 x=
"0 20 40 60 80 80 80 80 80 60 40 20 0 0 0 0"
84 y=
"0 0 0 0 0 20 40 60 80 80 80 80 80 60 40 20">
88 <text font-size=
"15" x=
"225" y=
"450" text-anchor=
"middle">Text with
<tspan rotate=
"10 -10 10 -10 10 -10 10" fill=
"red">rotated
</tspan> glyphs
</text>
89 <text font-size=
"15" x=
"225" y=
"465" text-anchor=
"middle" rotate=
"15">More rotated glyphs
</text>
93 <!-- ============================================================= -->
94 <!-- Batik sample mark -->
95 <!-- ============================================================= -->
96 <use xlink:
href=
"../resources/batikLogo.svg#Batik_Tag_Box" />