alternates-order.html (2515B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style type="text/css"> 5 @font-face { 6 font-family: libertine; 7 src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff"); 8 } 9 10 @font-face { 11 font-family: fontA; 12 src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff"); 13 font-feature-settings: "ss05" on; 14 } 15 16 @font-face { 17 font-family: fontB; 18 src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff"); 19 font-feature-settings: "ss05" off; 20 } 21 22 @font-feature-values libertine { 23 @styleset { 24 crossed-doubleu: 5; 25 somethingElse: 4; 26 } 27 } 28 29 @font-feature-values fontA { 30 @styleset { aLtW: 5; } 31 } 32 33 @font-feature-values fontB { 34 @styleset { crossedW: 5; several: 1 3 5; } 35 @styleset { altW: 4; } 36 } 37 38 @font-feature-values fontB { 39 @styleset { 40 AlTw: 5; 41 defined-for-fontB: 5; 42 scriptJ: 3; 43 } 44 } 45 46 body { 47 font-family: libertine, sans-serif; 48 font-size: 800%; 49 line-height: 1.2em; 50 } 51 52 /* font-feature-settings: "ss05"; crossed W */ 53 54 div { margin: 0 20px; } 55 56 #test1 { 57 font-variant-alternates: styleset(crossed-doubleu); 58 } 59 60 #test2 { 61 /* testing case-sensitivity of styleset name */ 62 font-family: fontB; 63 font-variant-alternates: styleset(altW); 64 } 65 66 #test3 { 67 /* testing case-sensitivity of styleset name */ 68 font-family: fontB; 69 font-variant-alternates: styleset(ALTW); 70 } 71 72 #test4 { 73 /* testing escapes in styleset name */ 74 font-family: fontB; 75 font-variant-alternates: styleset(\41 lTw); 76 } 77 78 #test5 { 79 /* testing font-specificity of feature value rule */ 80 font-family: fontA; 81 font-variant-alternates: styleset(defined-for-fontB); 82 } 83 84 #test6 { 85 /* testing one feature doesn't affect another */ 86 font-variant-alternates: styleset(somethingElse); 87 font-feature-settings: "ss05" on; 88 } 89 90 #test7 { 91 /* testing font-specificity of feature value rule */ 92 font-family: fontA; 93 font-variant-alternates: styleset(scriptJ); 94 font-feature-settings: "ss06"; 95 } 96 97 #test8 { 98 /* testing that an undefined value doesn't affect the results */ 99 font-family: fontB; 100 font-variant-alternates: styleset(scriptJ, somethingUndefined, defined-for-fontB); 101 } 102 103 #test9 { 104 /* testing matching of font name with escape */ 105 font-family: font\62 ; 106 font-variant-alternates: styleset(defined-for-fontB); 107 } 108 109 </style> 110 </head> 111 <body lang="en"> 112 <div><span id="test1">W</span> <span id="test2">W</span> <span id="test3">W</span></div> 113 <div><span id="test4">W</span> <span id="test5">W</span> <span id="test6">W</span></div> 114 <div><span id="test7">W</span> <span id="test8">W</span> <span id="test9">W</span></div> 115 </body> 116 </html>