Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / W3C-SVG-1.1 / resources / text-align-02-f.svg
blobb3b289710dcafa36d633071c5941ea067da1d188
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4 <!--======================================================================-->
5 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, Institut National de Recherche en =-->
7 <!--= Informatique et en Automatique, Keio University). All Rights =-->
8 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
9 <!--======================================================================-->
10 <!-- ===================================================================== -->
11 <!-- -->
12 <!-- text-textAnchor-BE-05.svg -->
13 <!-- renamed for 1.1 suite to text-align-02-f.svg -->
14 <!-- -->
15 <!-- Test viewer basic capability to handle 'text-anchor' property. -->
16 <!-- -->
17 <!-- Author : Lofton Henderson, 05-aug-2000. -->
18 <!-- 1.1 revision by Vincent Hardy -->
19 <!-- -->
20 <!-- History: -->
21 <!-- 05-aug-2000, LH: Serial#1 created. -->
22 <!-- 23-aug-2000, LH=" add test-body-content 'g'" ser#2 -->
23 <!-- -->
24 <!-- ===================================================================== -->
25 <!--======================================================================-->
26 <!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
27 <!--= log messages, and therefore is no longer in the preceding preamble.=-->
28 <!--======================================================================-->
29 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360">
30 <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
31 <OperatorScript>
32 <Paragraph>
33 Test for viewer capibility to handle the basics of the 'textAnchor'
34 alignment property for 'text' and related elements.
35 </Paragraph>
36 <Paragraph>
37 There are several groups of sub-tests. The first group at the top has an
38 initial sub-test with no text-anchor property ("none"), then
39 tests the three values of the text-anchor property -- start, middle, end --
40 for simple 'text' elements. In each case, the x-coordinate attribute of
41 the 'text' element corresponds to the position of the vertical red line.
42 </Paragraph>
43 <Paragraph>
44 The second group from the top contains sub-tests to verify that the
45 interpreter handles text-anchor when the text is comprised of other
46 text related elements, 'tspan', 'tref', and 'textPath'.
47 The text-anchor property is present on the containing 'text' element
48 in these cases, not on the contained child elements.
49 </Paragraph>
50 <Paragraph>
51 The third group from the top contains sub-tests to verify that
52 the interpreter correctly handles and applies the text-anchor
53 properties when present on "chunks", which are comprised of tspan elements
54 with absolute positioning, within the containing 'text' element.
55 </Paragraph>
56 <Paragraph>
57 The rendered picture should match the reference image, except for
58 possible variations in the text fonts and layout (per CSS2 rules).
59 </Paragraph>
60 <Paragraph>
61 The test also uses the 'rect' element,
62 as well as basic fill (solid primary colors),
63 stroke (black 1-pixel lines), font-family (Helvetica)
64 and font-size properties.
65 </Paragraph>
66 </OperatorScript>
67 </SVGTestCase>
69 <title id="test-title">text-align-03-f</title>
70 <desc id="test-desc">Test viewer basic capability to handle 'text-anchor' property.</desc>
71 <!--======================================================================-->
72 <!--Content of Test Case follows... =====================-->
73 <!--======================================================================-->
74 <g id="test-body-content">
75 <defs>
76 <text id="tref-internal-reference">end. text w/ tref</text>
77 <path id="myPath" d="M 150 135 375 135"/>
78 </defs>
79 <text x="105" y="25" font-family="Helvetica" font-size="14" fill="black" >Basic test of 'text-anchor' alignment property.</text>
80 <text x="45" y="375" font-size="12" >(The red line corresponds to the "initial current text position".)</text>
81 <text x="5" y="55" font-family="Helvetica" font-size="14" fill="black" >Simple text.</text>
82 <!-- Test cases -->
83 <g font-size="12" fill="blue" >
84 <line x1="105" y1="60" x2="105" y2="145" stroke="red" />
85 <text x="105" y="75">none</text>
86 <text x="105" y="95" text-anchor="start" >start</text>
87 <text x="105" y="115" text-anchor="middle" >middle</text>
88 <text x="105" y="135" text-anchor="end" >end</text>
89 </g>
90 <!-- Labels -->
91 <g font-size="10" fill="black" >
92 <text x="20" y="75">none...</text>
93 <text x="20" y="95">start...</text>
94 <text x="20" y="115">middle...</text>
95 <text x="20" y="135">end...</text>
96 </g>
97 <text x="175" y="55" font-family="Helvetica" font-size="14" fill="black" >Tspan, tref, toap</text>
98 <!-- Test cases -->
99 <line x1="375" y1="60" x2="375" y2="145" stroke="red" />
100 <g font-family="Helvetica" font-size="10" fill="blue" >
101 <text x="375" y="75" text-anchor="start" >start. text w/<tspan xml:space="preserve" fill="red" > red tspan</tspan></text>
102 <text x="375" y="95" text-anchor="middle" >middle. text w/<tspan font-weight="bold" xml:space="preserve"> bold tspan</tspan></text>
103 <text x="375" y="115" text-anchor="end" >
104 <tref xlink:href="#tref-internal-reference"/>
105 </text>
106 <text text-anchor="end" >
107 <textPath text-anchor="end" startOffset="100%" xlink:href="#myPath">Text-anchor: end. Text on path</textPath>
108 </text>
109 </g>
110 <!-- Labels -->
111 <g font-family="Helvetica" font-size="10" fill="black" >
112 <text x="190" y="75">tspan...</text>
113 <text x="190" y="95">tspan...</text>
114 <text x="190" y="115">tref...</text>
115 <text x="190" y="135">textPath...</text>
116 </g>
117 <text x="5" y="190" font-family="Helvetica" font-size="14" fill="black" >Changes in chunks.</text>
118 <!-- Test cases -->
119 <line x1="225" y1="195" x2="225" y2="265" stroke="red" />
120 <g font-family="Helvetica" font-size="10" fill="blue" >
121 <text x="225" y="210" text-anchor="end" >Begin with "end" align,<tspan x="225" y="230" xml:space="preserve" text-anchor="middle" > and switch to middle in a tspan, </tspan><tspan x="225" y="250" text-anchor="start" >and finish with start in another tspan.</tspan></text>
122 </g>
123 <!-- Labels -->
124 <g font-family="Helvetica" font-size="10" fill="black" >
125 <text x="20" y="210">end...</text>
126 <text x="20" y="230">middle...</text>
127 <text x="20" y="250">start...</text>
128 </g>
129 </g>
130 <!--======================================================================-->
131 <!--Legend and frame: Title, suite and SVG document serialization====-->
132 <!--======================================================================-->
133 <g id="test-legend" fill="black" font-family="Helvetica" font-size="10" >
134 <rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" />
135 <path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/>
136 <text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text>
137 <a xlink:href="copyright-documents-19990405.html">
138 <text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text>
139 </a>
140 <text font-size="12" x="35" y="330">text-align-02-f</text>
141 <text font-size="10" x="210" y="327">$Revision: 1.1 $</text>
142 <text font-size="10" x="210" y="345">Release 1.0</text>
143 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" />
144 </g>
146 </svg>