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