blob: 64bae31b8700e4755b778844a9d1280b95df9340 (
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
|
<!DOCTYPE html>
<html>
<head>
<title>CSS Test: feature value matching for font-variant-alternates</title>
<link rel="author" title="John Daggett" href="mailto:jdaggett@mozilla.com"/>
<link rel="help" href="http://www.w3.org/TR/css-fonts-4/#font-variant-alternates-prop"/>
<link rel="help" href="http://www.w3.org/TR/css-fonts-4/#font-feature-values"/>
<link rel="match" href="alternates-order-ref.html"/>
<meta name="assert" content="Case and order of font family name or feature name should not affect alternate rendered"/>
<style type="text/css">
@font-face {
font-family: libertine;
src: url(support/fonts/LinLibertine_Re-4.7.5.woff) format("woff");
}
@font-face {
font-family: fontA;
src: url(support/fonts/LinLibertine_Re-4.7.5.woff) format("woff");
font-feature-settings: "ss05" on;
}
@font-face {
font-family: fontB;
src: url(support/fonts/LinLibertine_Re-4.7.5.woff) format("woff");
font-feature-settings: "ss05" off;
}
@font-feature-values libertine {
@styleset {
crossed-doubleu: 5;
somethingElse: 4;
}
}
@font-feature-values fontA {
@styleset { aLtW: 5; }
}
@font-feature-values fontB {
@styleset { crossedW: 5; several: 1 3 5; }
@styleset { altW: 4; }
}
@font-feature-values fontB {
@styleset {
AlTw: 5;
defined-for-fontB: 5;
scriptJ: 3;
}
}
body {
font-family: libertine, sans-serif;
font-size: 800%;
line-height: 1.2em;
}
/* -moz-font-feature-settings: "ss05"; crossed W */
div { margin: 0 20px; }
#test1 {
font-variant-alternates: styleset(crossed-doubleu);
}
#test2 {
/* testing case-sensitivity of styleset name */
font-family: fontB;
font-variant-alternates: styleset(altW);
}
#test3 {
/* testing case-sensitivity of styleset name */
font-family: fontB;
font-variant-alternates: styleset(ALTW);
}
#test4 {
/* testing escapes in styleset name */
font-family: fontB;
font-variant-alternates: styleset(\41 lTw);
}
#test5 {
/* testing font-specificity of feature value rule */
font-family: fontA;
font-variant-alternates: styleset(defined-for-fontB);
}
#test6 {
/* testing one feature doesn't affect another */
font-variant-alternates: styleset(somethingElse);
-moz-font-feature-settings: "ss05" on;
font-feature-settings: "ss05" on;
}
#test7 {
/* testing font-specificity of feature value rule */
font-family: fontA;
font-variant-alternates: styleset(scriptJ);
-moz-font-feature-settings: "ss06";
font-feature-settings: "ss06";
}
#test8 {
/* testing that an undefined value doesn't affect the results */
font-family: fontB;
font-variant-alternates: styleset(scriptJ, somethingUndefined, defined-for-fontB);
}
#test9 {
/* testing matching of font name with escape */
font-family: font\62 ;
font-variant-alternates: styleset(defined-for-fontB);
}
</style>
</head>
<body lang="en">
<div><span id="test1">W</span> <span id="test2">W</span> <span id="test3">W</span></div>
<div><span id="test4">W</span> <span id="test5">W</span> <span id="test6">W</span></div>
<div><span id="test7">W</span> <span id="test8">W</span> <span id="test9">W</span></div>
</body>
</html>
|