Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / W3C-SVG-1.1 / text-text-05-t.svg
blob9f610ae66768fce2377a2ea98ccfce9e268a1e2b
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- =====================================================================-->
3 <!-- -->
4 <!-- text-text-05-t.svg -->
5 <!-- -->
6 <!-- Tests that the viewer can handle the rotate attribute on the text -->
7 <!-- element. -->
8 <!-- -->
9 <!-- Author : Vincent Hardy, 06-Jan-2004 --><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
11 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
12 <SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" owner="VH" desc="Tests that the viewer can handle the rotate attribute on the text element" status="accepted" version="$Revision: 1.8 $" testname="$RCSfile: text-text-05-t.svg,v $">
13 <OperatorScript>
14 <Paragraph>
15 The purpose of this test is to validate the interaction of text-anchor
16 and x/y glyph positioning.
17 </Paragraph>
18 <Paragraph>
19 Each row shows a different combination of x/y values: 1, more than characters,
20 fewer than characters. Each column shows different anchor values: start, middle
21 and end.
22 </Paragraph>
23 <Paragraph>
24 The blue markers show the various x/y absolute positions around which text
25 chunks should be anchored. The glyphs are black squares of increasing sizes.
26 </Paragraph>
27 </OperatorScript>
28 </SVGTestCase>
29 <title id="test-title">text-fontSize-01-t.svg</title>
30 <desc id="test-desc"/>
32 <!--======================================================================-->
33 <!--Content of Test Case follows... =====================-->
34 <!--======================================================================-->
35 <g id="test-body-content" font-size="16">
36 <defs>
37 <font id="embeded" horiz-adv-x="224">
38 <font-face font-family="embeded" units-per-em="1000" panose-1="0 0 0 0 0 0 0 0 0 0" ascent="917" descent="-250" alphabetic="0"/>
39 <missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z"/>
40 <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="1500" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
41 <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z"/>
42 <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="1500" d="M 0 0 L 750 0 L 750 750 L 0 750 Z"/>
43 <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1500" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z"/>
44 </font>
46 </defs>
48 <defs>
49 <g id="marker">
50 <line y2="-15" stroke="red"/>
51 <rect x="-4" y="-4" width="8" height="8"/>
52 </g>
53 </defs>
55 <g id="legend" transform="translate(10, 40)">
56 <text y="30">1.x 1.y</text>
57 <text y="60">4.x 1.y</text>
58 <text y="90">2.x 1.y</text>
59 <text y="120">1.x 4.y</text>
60 <text y="150">4.x 4.y</text>
61 <text y="180">2.x 4.y</text>
62 <text y="210">1.x 2.y</text>
63 <text y="240">4.x 2.y</text>
64 <text y="270">2.x 2.y</text>
65 </g>
67 <g id="anchorStart" text-anchor="start" transform="translate(150, 40)">
68 <text y="-17" text-anchor="middle">text-anchor</text>
69 <text y="-3" text-anchor="middle">start</text>
70 <line x1="0" y1="10" x2="0" y2="290" stroke="red"/>
72 <g id="textContent">
73 <!-- 1.x 1.y -->
74 <use y="30" xlink:href="#marker" fill="#8888ff"/>
75 <text x="0" y="30" font-family="embeded" font-size="10">1234</text>
77 <!-- 4.x 1.y : four text chunks -->
78 <use x="10" y="60" xlink:href="#marker" fill="#8888ff"/>
79 <use x="20" y="60" xlink:href="#marker" fill="#8888ff"/>
80 <use x="30" y="60" xlink:href="#marker" fill="#8888ff"/>
81 <use x="40" y="60" xlink:href="#marker" fill="#8888ff"/>
82 <text x="10 20 30 40" y="60" font-family="embeded" font-size="10">1234</text>
84 <!-- 2.x 1.y : two text chunks -->
85 <use x="10" y="90" xlink:href="#marker" fill="#8888ff"/>
86 <use x="60" y="90" xlink:href="#marker" fill="#8888ff"/>
87 <text x="10 60" y="90" font-family="embeded" font-size="10">1234</text>
89 <!-- 1.x 4.y : four text chunks -->
90 <g transform="translate(0, 120)">
91 <use x="0" y="-10" xlink:href="#marker" fill="#8888ff"/>
92 <use x="15" y="-5" xlink:href="#marker" fill="#8888ff"/>
93 <use x="30" y="5" xlink:href="#marker" fill="#8888ff"/>
94 <use x="45" y="10" xlink:href="#marker" fill="#8888ff"/>
95 <text x="0" y="-10 -5 5 10" font-family="embeded" font-size="10">1234</text>
96 </g>
98 <!-- 4.x 4.y : four text chunks -->
99 <g transform="translate(0, 150)">
100 <use x="10" y="-10" xlink:href="#marker" fill="#8888ff"/>
101 <use x="20" y="-5" xlink:href="#marker" fill="#8888ff"/>
102 <use x="30" y="5" xlink:href="#marker" fill="#8888ff"/>
103 <use x="40" y="10" xlink:href="#marker" fill="#8888ff"/>
104 <text x="10 20 30 40" y="-10 -5 5 10" font-family="embeded" font-size="10">1234</text>
105 </g>
107 <!-- 2.x 4.y : four text chunks -->
108 <g transform="translate(0, 180)">
109 <use x="10" y="-10" xlink:href="#marker" fill="#8888ff"/>
110 <use x="20" y="-5" xlink:href="#marker" fill="#8888ff"/>
111 <use x="35" y="5" xlink:href="#marker" fill="#8888ff"/>
112 <use x="50" y="10" xlink:href="#marker" fill="#8888ff"/>
113 <text x="10 20" y="-10 -5 5 10" font-family="embeded" font-size="10">1234</text>
114 </g>
116 <!-- 1.x 2.y : two text chunks -->
117 <g transform="translate(0, 210)">
118 <use x="0" y="-10" xlink:href="#marker" fill="#8888ff"/>
119 <use x="15" y="5" xlink:href="#marker" fill="#8888ff"/>
120 <text x="0" y="-10 5" font-family="embeded" font-size="10">1234</text>
121 </g>
123 <!-- 4.x 2.y : four text chunks -->
124 <g transform="translate(0, 240)">
125 <use x="10" y="-10" xlink:href="#marker" fill="#8888ff"/>
126 <use x="20" y="-5" xlink:href="#marker" fill="#8888ff"/>
127 <use x="30" y="-5" xlink:href="#marker" fill="#8888ff"/>
128 <use x="40" y="-5" xlink:href="#marker" fill="#8888ff"/>
129 <text x="10 20 30 40" y="-10 -5" font-family="embeded" font-size="10">1234</text>
130 </g>
132 <!-- 2.x 2.y : two text chunks -->
133 <g transform="translate(0, 270)">
134 <use x="10" y="-10" xlink:href="#marker" fill="#8888ff"/>
135 <use x="60" y="-5" xlink:href="#marker" fill="#8888ff"/>
136 <text x="10 60" y="-10 -5" font-family="embeded" font-size="10">1234</text>
137 </g>
139 </g>
140 </g>
142 <g id="anchorMiddle" text-anchor="middle" transform="translate(250, 40)">
143 <text y="-17" text-anchor="middle">text-anchor</text>
144 <text y="-3" text-anchor="middle">middle</text>
145 <line x1="0" y1="10" x2="0" y2="290" stroke="red"/>
146 <use xlink:href="#textContent"/>
147 </g>
149 <g id="anchorEnd" text-anchor="end" transform="translate(350, 40)">
150 <text y="-17" text-anchor="middle">text-anchor</text>
151 <text y="-3" text-anchor="middle">end</text>
152 <line x1="0" y1="10" x2="0" y2="290" stroke="red"/>
153 <use xlink:href="#textContent"/>
154 </g>
156 </g>
158 <text id="revision" x="10" y="350" font-size="40" stroke="none" fill="black">$Revision: 1.8 $</text>
159 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
161 </svg>