File: textLayout2.svg

package info (click to toggle)
batik 1.7%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 29,196 kB
  • sloc: java: 194,874; xml: 16,741; sh: 163; makefile: 41
file content (99 lines) | stat: -rw-r--r-- 5,013 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

<!--

   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

-->
<!-- ========================================================================= -->
<!-- Test description here                                                     -->
<!--                                                                           -->
<!-- @author bill.haneman@ireland.sun.com                                      -->
<!-- @version $Id: textLayout2.svg 475685 2006-11-16 11:16:05Z cam $                                                             -->
<!-- ========================================================================= -->
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
<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">
    <title>Text Layout Properties</title>

    <!-- ============================================================= -->
    <!-- Test content                                                  -->
    <!-- ============================================================= -->

    <defs>
     <style type="text/css"><![CDATA[
       .Caption { font-size: 8; font-family: dialog; font-weight: normal;
                  font-style: normal; stroke: none; stroke-width: 0; 
                  fill: black } ]]>
     </style>

     <style type="text/css"><![CDATA[
       .SerifPlain { font-size: 24; font-family: Serif; font-weight: normal;
                  font-style: normal; stroke: none; stroke-width: 0; 
                  fill: black } ]]>
     </style>

     <text x="0" y="0" text-anchor="start" id="sample">sample</text>

    </defs>

    <g id="testContent" text-anchor="start" font-size="30" class="SerifPlain">
        <text text-anchor="middle" class="title" x="50%" y="10%" font-size="15" >
            Text Layout Properties (2)</text>

        <text x="50%" y="15%" text-anchor="middle" font-size="10">Baseline Properties</text>

        <g text-anchor="middle">
            <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>
            <text x="225" y="135" class="Caption">baseline-shift="super"/baseline-shift="sub"</text>
        </g>

        <g text-anchor="middle">
            <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>
            <text x="225" y="180" class="Caption">baseline-shift="+/-20%"</text>
        </g>
        <text x="50%" y="42%" text-anchor="middle" font-size="10">Multi-line Text Selection</text>

        <text x="50%" y="45%" text-anchor="middle" font-size="7.5" font-style="italic">(Try selecting the following text regions)</text>

        <text text-anchor="start" font-size="15">
            <tspan x="120" y="50%">Text selections can span multiple</tspan>
            <tspan x="120" y="53%">lines via &lt;tspan&gt; elements.</tspan>
        </text>

        <text text-anchor="start" fill="blue" font-size="20" transform="translate(90, 360)">
            <tspan x="0 10 25 50 75 90 100 90 75 50 25 10 0" 
                   y="0 -25 -40 -50 -40 -25 0 25 40 50 40 25 10 0">Text-circle.</tspan>
        </text>

        <text fill="green" font-size="20" transform="translate(250, 320)"
              x="0 20 40 60 80 80 80 80 80 60 40 20 0 0 0 0" 
              y="0 0 0 0 0 20 40 60 80 80 80 80 80 60 40 20">
            Text-in-a-square
        </text>

        <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>
        <text font-size="15" x="225" y="465" text-anchor="middle" rotate="15">More rotated glyphs</text>

    </g>

    <!-- ============================================================= -->
    <!-- Batik sample mark                                             -->
    <!-- ============================================================= -->
    <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
    
</svg>