summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/conformance-checkers/html-svg/fonts-kern-01-t-isvalid.html
blob: f23ccc5b106402e3a4e8b6d1dc5108aab061e2de (plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html>
<html lang='en'>
<head>
 <title>fonts-kern-01-t-manual.svg</title>
 <meta charset='utf-8'>
</head>
<body>
 <h1>Source SVG: fonts-kern-01-t-manual.svg</h1>
<svg version="1.1" baseProfile="tiny" id="svg-root"
  width="100%" height="100%" viewBox="0 0 480 360"
  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <!--======================================================================-->
  <!--=  SVG 1.1 2nd Edition Test Case                                     =-->
  <!--======================================================================-->
  <!--=  Copyright 2009 World Wide Web Consortium, (Massachusetts          =-->
  <!--=  Institute of Technology, European Research Consortium for         =-->
  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
  <!--=  All Rights Reserved.                                              =-->
  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
  <!--======================================================================-->
  
  <title id="test-title">$RCSfile: fonts-kern-01-t.svg,v $</title>
  <defs>
    <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
      <font-face-src>
        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
      </font-face-src>
    </font-face>
  </defs>
  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
    <defs>
      <g id="marker">
        <!-- <rect x="0" y="-10" width="10" height="10" /> -->
        <line y2="-12" stroke="red" stroke-width="1"/>
        <line x2="12" stroke="red" stroke-width="1"/>
        <rect x="-2" y="-2" width="4" height="4" fill="red"/>
      </g>
      <g id="sampleBkg">
        <rect width="200" height="20" fill="#eeeeee"/>
        <rect y="20" width="200" height="30" fill="#cccccc"/>
        <rect width="200" height="50" fill="none" stroke="black"/>
      </g>
    </defs>
    <defs>

    <font horiz-adv-x="224">
<font-face font-family="fontG" units-per-em="1000" ascent="917" descent="-250"/>
        <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z"/>
        <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
        <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"/>
        <hkern u1="1" g2="gl_2" k="-1000"/>
    </font>

    <font horiz-adv-x="224">
<font-face font-family="fontF" units-per-em="1000" ascent="917" descent="-250"/>
        <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z"/>
        <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
        <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"/>
        <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z"/>
        <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z"/>
        <!-- u1 covers '0' to '9' and ':' ';' '<' '=' '>' '?' -->
        <!-- u2 covers '1' '2' '3' and '4'                    -->
        <!-- So, this is a match for '12', '23' and '34'      -->
        <hkern u1="U+003?" u2="U+0031-0034" k="-1500"/>
    </font>

    <font horiz-adv-x="224">
<font-face font-family="fontE" units-per-em="1000" ascent="917" descent="-250"/>
        <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z"/>
        <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
        <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"/>
        <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z"/>
        <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z"/>
        <hkern g1="gl_1,gl_3" g2="gl_2,gl_4" k="-1500"/>
    </font>

    <font horiz-adv-x="224">
<font-face font-family="fontD" units-per-em="1000" ascent="917" descent="-250"/>
        <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z"/>
        <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
        <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"/>
        <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z"/>
        <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z"/>
        <hkern u1="1,3" u2="2,4" k="-1500"/>
    </font>

    <font horiz-adv-x="224">
<font-face font-family="fontC" units-per-em="1000" ascent="917" descent="-250"/>
        <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z"/>
        <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
        <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"/>
        <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z"/>
        <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z"/>

        <hkern u1="1" u2="2" g1="gl_3" g2="gl_4" k="-1500"/>
    </font>

    <font horiz-adv-x="224">
<font-face font-family="fontB" units-per-em="1000" ascent="917" descent="-250"/>
        <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z"/>
        <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
        <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z"/>
        <hkern g1="gl_1" g2="gl_2" k="-2000"/>
    </font>

    <font horiz-adv-x="224">
<font-face font-family="fontA" units-per-em="1000" ascent="917" descent="-250"/>
        <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z"/>
        <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
        <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z"/>
        <hkern u1="1" u2="2" k="-1000"/>
    </font>

    </defs>
    <text x="240" y="30" font-size="20" text-anchor="middle">&lt;hkern&gt;</text>
    <g id="legend" transform="translate(30, 60)">
      <g>
        <g>
          <rect x="-20" width="20" height="50" fill="none" stroke="black"/>
          <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font A</text>
        </g>
        <use xlink:href="#sampleBkg"/>
        <text x="5" y="15" font-size="12">u1="1" u2="2"</text>
        <g transform="translate(5, 45) scale(2)" font-size="10">
          <!-- Advance for '1': 0 -->
          <use xlink:href="#marker" fill="#8888ff"/>

          <!-- Advance for '2' : '1'.advance + kerning             -->
          <!--                 : ((250 - (-1000))/1000)*10         -->
          <!--                 : 12.5                              -->
          <use xlink:href="#marker" x="12.5" fill="#8888ff"/>
          <text font-family="fontA" font-size="10">12</text>
        </g>
      </g>

      <g transform="translate(0, 55)">
        <g>
          <rect x="-20" width="20" height="50" fill="none" stroke="black"/>
          <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font B</text>
        </g>
        <use xlink:href="#sampleBkg"/>
        <text x="5" y="15" font-size="12">g1="gl_1" g2="gl_2"</text>
        <g transform="translate(5, 45) scale(2)">
          <use xlink:href="#marker" fill="#8888ff"/>
          <use xlink:href="#marker" x="22.5" fill="#8888ff"/>
          <text font-family="fontB" font-size="10">12</text>
        </g>
      </g>

      <g transform="translate(0, 110)">
        <g>
          <rect x="-20" width="20" height="50" fill="none" stroke="black"/>
          <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font C</text>
        </g>
        <use xlink:href="#sampleBkg"/>
        <text x="5" y="15" font-size="12">u1="1" u2="2" g1="gl_3" g2="gl_4"</text>
        <g transform="translate(5, 45) scale(2)">
          <use xlink:href="#marker" fill="#8888ff"/>
          <!-- ((1.adv + '12'.k)/unitsPerEm)*fontSize -->
          <use xlink:href="#marker" x="17.5" fill="#8888ff"/>
          <use xlink:href="#marker" x="32.5" fill="#8888ff"/>
          <!-- ((3.adv + '34'.k)/unitsPerEm)*fontSize -->
          <use xlink:href="#marker" x="55" fill="#8888ff"/>
          <text font-family="fontC" font-size="10">1234</text>
        </g>
      </g>

      <g transform="translate(0, 165)">
        <g>
          <rect x="-20" width="20" height="50" fill="none" stroke="black"/>
          <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font D</text>
        </g>
        <use xlink:href="#sampleBkg"/>
        <text x="5" y="15" font-size="12">u1="1,3" u2="2,4"</text>
        <g transform="translate(5, 45) scale(2)">
          <use xlink:href="#marker" fill="#8888ff"/>
          <use xlink:href="#marker" x="17.5" fill="#8888ff"/>
          <use xlink:href="#marker" x="32.5" fill="#8888ff"/>
          <use xlink:href="#marker" x="55" fill="#8888ff"/>
          <text font-family="fontD" font-size="10">1234</text>
        </g>
      </g>

      <g transform="translate(240, 0)">
        <g>
          <rect x="-20" width="20" height="50" fill="none" stroke="black"/>
          <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font E</text>
        </g>
        <use xlink:href="#sampleBkg"/>
        <text x="5" y="15" font-size="12">g1="gl_1,gl_3" g2="gl_2,gl_4"</text>
        <g transform="translate(5, 45) scale(2)">
          <use xlink:href="#marker" fill="#8888ff"/>
          <use xlink:href="#marker" x="17.5" fill="#8888ff"/>
          <use xlink:href="#marker" x="32.5" fill="#8888ff"/>
          <use xlink:href="#marker" x="55" fill="#8888ff"/>
          <text font-family="fontE" font-size="10">1234</text>
        </g>
      </g>

      <g transform="translate(240, 55)">
        <g>
          <rect x="-20" width="20" height="50" fill="none" stroke="black"/>
          <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font F</text>
        </g>
        <use xlink:href="#sampleBkg"/>
        <text x="5" y="15" font-size="12">u1="U+003?" u2="U+0031-34"</text>
        <g transform="translate(5, 45) scale(2)">
          <use xlink:href="#marker" fill="#8888ff"/>
          <!-- '2' -->
          <use xlink:href="#marker" x="17.5" fill="#8888ff"/>
          <!-- '3' -->
          <use xlink:href="#marker" x="47.5" fill="#8888ff"/>
          <!-- '4' -->
          <use xlink:href="#marker" x="70" fill="#8888ff"/>
          <text font-family="fontF" font-size="10">1234</text>
        </g>
      </g>

      <g transform="translate(240, 110)">
        <g>
          <rect x="-20" width="20" height="50" fill="none" stroke="black"/>
          <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font G</text>
        </g>
        <use xlink:href="#sampleBkg"/>
        <text x="5" y="15" font-size="12">u1="1" g2="gl_2"</text>
        <g transform="translate(5, 45) scale(2)">
          <!-- Advance for '1': 0 -->
          <use xlink:href="#marker" fill="#8888ff"/>

          <!-- Advance for '2' : '1'.advance + kerning             -->
          <!--                 : ((250 - (-1000))/1000)*10         -->
          <!--                 : 12.5                              -->
          <use xlink:href="#marker" x="12.5" fill="#8888ff"/>
          <text font-family="fontG" font-size="10">12</text>
        </g>
      </g>
    </g>
    <g id="testContent" transform="translate(320, 100)" font-size="10">
    </g>
  </g>
  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
  </g>
  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
  <!-- comment out this watermark once the test is approved -->
  <!--<g id="draft-watermark">
    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
  </g>-->
</svg>
</body>
</html>