layout/reftests/font-features/alternates-order.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/font-features/alternates-order.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,116 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +<style type="text/css">
     1.8 +@font-face {
     1.9 +  font-family: libertine;
    1.10 +  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
    1.11 +}
    1.12 +
    1.13 +@font-face {
    1.14 +  font-family: fontA;
    1.15 +  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
    1.16 +  -moz-font-feature-settings: "ss05" on;
    1.17 +}
    1.18 +
    1.19 +@font-face {
    1.20 +  font-family: fontB;
    1.21 +  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
    1.22 +  -moz-font-feature-settings: "ss05" off;
    1.23 +}
    1.24 +
    1.25 +@font-feature-values libertine {
    1.26 +  @styleset { 
    1.27 +    crossed-doubleu: 5;
    1.28 +    somethingElse: 4;
    1.29 +  }
    1.30 +}
    1.31 +
    1.32 +@font-feature-values fontA {
    1.33 +  @styleset { aLtW: 5; }
    1.34 +}
    1.35 +
    1.36 +@font-feature-values fontB {
    1.37 +  @styleset { crossedW: 5; several: 1 3 5; }
    1.38 +  @styleset { altW: 4; }
    1.39 +}
    1.40 +
    1.41 +@font-feature-values fontB {
    1.42 +  @styleset {
    1.43 +    AlTw: 5;
    1.44 +    defined-for-fontB: 5;
    1.45 +    scriptJ: 3;
    1.46 +  }
    1.47 +}
    1.48 +
    1.49 +body {
    1.50 +  font-family: libertine, sans-serif;
    1.51 +  font-size: 800%;
    1.52 +  line-height: 1.2em;
    1.53 +}
    1.54 +
    1.55 +/* -moz-font-feature-settings: "ss05"; crossed W */
    1.56 +
    1.57 +div { margin: 0 20px; }
    1.58 +
    1.59 +#test1 {
    1.60 +  font-variant-alternates: styleset(crossed-doubleu);
    1.61 +}
    1.62 +
    1.63 +#test2 {
    1.64 +  /* testing case-insensitivity of styleset name */
    1.65 +  font-family: fontB;
    1.66 +  font-variant-alternates: styleset(altW);
    1.67 +}
    1.68 +
    1.69 +#test3 {
    1.70 +  /* testing case-insensitivity of styleset name */
    1.71 +  font-family: fontB;
    1.72 +  font-variant-alternates: styleset(ALTW);
    1.73 +}
    1.74 +
    1.75 +#test4 {
    1.76 +  /* testing escapes in styleset name */
    1.77 +  font-family: fontB;
    1.78 +  font-variant-alternates: styleset(\41 ltW);
    1.79 +}
    1.80 +
    1.81 +#test5 {
    1.82 +  /* testing font-specificity of feature value rule */
    1.83 +  font-family: fontA;
    1.84 +  font-variant-alternates: styleset(defined-for-fontB);
    1.85 +}
    1.86 +
    1.87 +#test6 {
    1.88 +  /* testing one feature doesn't affect another */
    1.89 +  font-variant-alternates: styleset(somethingElse);
    1.90 +  -moz-font-feature-settings: "ss05" on;
    1.91 +}
    1.92 +
    1.93 +#test7 {
    1.94 +  /* testing font-specificity of feature value rule */
    1.95 +  font-family: fontA;
    1.96 +  font-variant-alternates: styleset(scriptJ);
    1.97 +  -moz-font-feature-settings: "ss06";
    1.98 +}
    1.99 +
   1.100 +#test8 {
   1.101 +  /* testing that an undefined value doesn't affect the results */
   1.102 +  font-family: fontB;
   1.103 +  font-variant-alternates: styleset(scriptJ, somethingUndefined, defined-for-fontB);
   1.104 +}
   1.105 +
   1.106 +#test9 {
   1.107 +  /* testing matching of font name with escape */
   1.108 +  font-family: font\62 ;
   1.109 +  font-variant-alternates: styleset(defined-for-fontB);
   1.110 +}
   1.111 +
   1.112 +</style>
   1.113 +</head>
   1.114 +<body lang="en">
   1.115 +<div><span id="test1">W</span> <span id="test2">W</span> <span id="test3">W</span></div>
   1.116 +<div><span id="test4">W</span> <span id="test5">W</span> <span id="test6">W</span></div>
   1.117 +<div><span id="test7">W</span> <span id="test8">W</span> <span id="test9">W</span></div>
   1.118 +</body>
   1.119 +</html>

mercurial