Debian Codegraph @

samples/tests/spec/text/smallFonts.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 <!-- Tests small font sizes (<1) with various text features. -->
25 <!-- This is basically a copy of the textFeatures test file with a small -->
26 <!-- viewbox set. -->
27 <!-- -->
28 <!-- @author [email protected] -->
29 <!-- @version $Id$ -->
30 <!-- ========================================================================= -->
31 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
32 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="450" height="500" viewBox="0 0 9 10">
33 <!-- ============================================================= -->
34 <!-- Test content -->
35 <!-- ============================================================= -->
36
37 <defs>
38 <filter id="blur" filterUnits="userSpaceOnUse" x="0" y="-1.6" width="4" height="2" filterRes="200">
39 <feGaussianBlur stdDeviation="0.04 0.04" x="0" y="-1.6" width="4" height="2"/>
40 </filter>
41
42 <path id="Path1" style="fill:none; stroke:green; stroke-width:5" transform="scale(0.003,0.003)"
43 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"/>
44
45 </defs>
46
47 <g id="testContent" stroke-width="0.01">
48
49 <text x="50%" y="10%" font-size="0.3" text-anchor="middle" >
50 Small font size test (viewBox="0 0 9 10")</text>
51
52 <g font-family="dialog" font-size="0.3"
53 text-anchor="start" fill="MidnightBlue">
54 <text x="10%" y="20%">
55 Text can change
56 <tspan font-size="0.6">size,</tspan>
57 <tspan font-size="0.4" font-family="Serif">typeface,</tspan>
58 <tspan fill="green">color,</tspan>
59 or
60 <tspan fill="none" font-style="oblique" stroke="red" stroke-width="0.02">style</tspan>
61 </text>
62
63 <text fill="MidnightBlue" x="10%" y="24%">
64 within a single text element.
65 </text>
66
67 <text x="10%" y="32%">Styling features include
68 <tspan font-weight="bold">weight,</tspan>
69 <tspan font-style="oblique">posture,</tspan> and
70 <tspan font-family="serif">typeface.</tspan>
71 </text>
72
73 <rect x="10%" y="35%" width="45%" height="10%" fill="DodgerBlue"/>
74 <text x="10%" y="40%">
75 Graphics attributes such as
76 <tspan fill="red" opacity="0.3">opacity</tspan> can be applied.
77 </text>
78
79 <text x="10%" y="50%">"text decoration" can include
80 <tspan text-decoration="underline">underline,</tspan>
81 <tspan text-decoration="overline">overline,</tspan> and
82 </text>
83
84 <text x="10%" y="54%">
85 <tspan text-decoration="line-through">strikethrough. </tspan>
86 <tspan dx="0.1" baseline-shift="super" font-size="0.2">Super</tspan> and
87 <tspan baseline-shift="sub" font-size="0.2">sub</tspan> scripts are available.
88 </text>
89
90 <text x="10%" y="62%" stroke-linecap="round" stroke-linejoin="round">
91 Various
92 <tspan stroke="red" fill="none" stroke-width="0.01">outline
93 </tspan>styles,
94 <tspan stroke="red" stroke-width="0.01" fill="blue" >fill colors
95 </tspan>and
96 <tspan stroke="red" stroke-width="0.02" fill="blue" >thicknesses
97 </tspan>can be
98 </text>
99
100 <text x="10%" y="66%">used, and the outline stroke can be
101 <tspan stroke="black" fill="none" stroke-width="0.01"
102 stroke-linecap="round" stroke-linejoin="round">rounded</tspan>
103 or
104 <tspan stroke="black" fill="none" stroke-width="0.01"
105 stroke-linecap="square" stroke-linejoin="miter">mitered.</tspan>
106 </text>
107
108 <text x="10%" y="75%">Text elements also can be filtered, transformed
109 <tspan x="10%" y="79%">and placed on a path.</tspan></text>
110
111 <g font-size="0.8" transform="translate(1.5, 9)">
112 <text x="0" y="0" filter="url(#blur)" fill="black" opacity="0.7"
113 transform="skewX(40) translate(-0.12,-0.12)">
114 Shadow
115 </text>
116 <text x="0" y="0" stroke="black" stroke-width="0.01" fill="white">
117 Shadow
118 </text>
119 </g>
120
121 <g transform="translate(5,8)">
122 <use xlink:href="#Path1"/>
123 <text font-size="0.3" style="text-anchor:start">
124 <textPath xlink:href="#Path1" startOffset="0%">Small text <tspan fill="red" dy="-0.1">on</tspan><tspan dy="0.1"> a Path</tspan></textPath>
125 </text>
126 </g>
127
128 </g>
129 </g>
130
131 <!-- ============================================================= -->
132 <!-- Batik sample mark -->
133 <!-- ============================================================= -->
134 <use transform="scale(0.02, 0.02)" xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
135
136 </svg>