summaryrefslogtreecommitdiffstats
path: root/layout/reftests/font-face/name-collision.html
blob: 5bff99d4339ed686e0686cb6ec68d7dfebea7081 (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
<!DOCTYPE HTML>
<html>
<head>
<title>Font name collision test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!-- 
  Font family names in @font-face rules take precedence over locally-available font families,
  so none of the names of commonly used platform fonts should match against locally available
  fonts.
-->

<style type="text/css">

@font-face {
  font-family: fallback;
  src: url(../fonts/mplus/mplus-1p-regular.ttf);
}

body {
  margin: 50px;
  font-family: fallback;
}

table {
  margin-left: 3em;
}

@font-face {
  font-family: Sample;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.sample { font-family: Sample, fallback; }

/* Windows */

@font-face {
  font-family: Arial;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.arial { font-family: Arial, fallback; }

@font-face {
  font-family: Times New Roman;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.timesnewroman { font-family: Times New Roman, fallback; }

@font-face {
  font-family: Courier New;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.couriernew { font-family: Courier New, fallback; }

/* Mac OS X */

@font-face {
  font-family: Futura;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.futura { font-family: Futura, fallback; }

@font-face {
  font-family: Helvetica;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.helvetica { font-family: Helvetica, fallback; }

@font-face {
  font-family: Times;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.times { font-family: Times, fallback; }

@font-face {
  font-family: Courier;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.courier { font-family: Courier, fallback; }

/* Linux */

@font-face {
  font-family: Bitstream Vera Sans;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.bitstreamverasans { font-family: Bitstream Vera Sans, fallback; }

@font-face {
  font-family: DejaVu Sans;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.dejavusans { font-family: DejaVu Sans, fallback; }

@font-face {
  font-family: FreeSans;
  src: url(../fonts/mplus/mplus-1p-black.ttf);
  font-weight: 900;
}

.freesans { font-family: FreeSans, fallback; }

table {
  font-family: Sample;
}

table td {
  font-size: 24pt;
}

</style>

</head>

<body>

<p>All text below should appear in the same extra bold font face:</p>

<table>
<tr class="sample"><td>Sample</td></tr>
<tr class="arial"><td>Arial</td></tr>
<tr class="timesnewroman"><td>Times New Roman</td></tr>
<tr class="couriernew"><td>Courier New</td></tr>
<tr class="futura"><td>Futura</td></tr>
<tr class="helvetica"><td>Helvetica</td></tr>
<tr class="times"><td>Times</td></tr>
<tr class="courier"><td>Courier</td></tr>
<tr class="bitstreamverasans"><td>Bitstream Vera Sans</td></tr>
<tr class="dejavusans"><td>DejaVu Sans</td></tr>
<tr class="freesans"><td>FreeSans</td></tr>
</table>

</body>
</html>