font-variant-alternates-05.html (1538B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 4 <title>CSS Test: font-variant-alternates: stylistic(); low level equivalence</title> 5 <link rel="author" title="Chris Lilley" href="chris@w3.org"> 6 <link rel="match" href="font-variant-alternates-05-ref.html"> 7 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-variant-alternates-prop"> 8 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-feature-settings-prop"> 9 <link rel="help" href="https://drafts.csswg.org/css-fonts/#font-feature-values"> 10 <meta name="assert" content="Enables display of stylistic alternates (font specific, OpenType feature: salt <feature-index>)"> 11 <style> 12 @font-face { 13 font-family: fwf; 14 src: url(support/fonts/FontWithFancyFeatures.otf); 15 } 16 @font-feature-values fwf { 17 @stylistic { 18 foo: 1; 19 bar: 2; 20 baz: 3; 21 } 22 } 23 .test { 24 font-family: fwf; 25 font-size: 2em; 26 line-height: 1.1; 27 } 28 .high { 29 font-variant-alternates: stylistic(baz); 30 } 31 .low { 32 font-feature-settings: "hist" off, "salt" 03, "ss01" off, "ss02" off, "ss03" off, 33 "cv01" off, "cv02" off, "cv03" off, "swsh" 00, "cswh" 00, "ornm" 00, "nalt" 00; 34 } 35 </style> 36 <body> 37 38 <p>Test passes if the three lines below are identical, with three crosses (✗), one check mark (✓) followed by sixteen crosses (✗). </p> 39 <section class="test"> 40 <p class="high">Xnophijklmqrstuvwxyz</p> 41 <p class="low">Xnophijklmqrstuvwxyz</p> 42 <p class="ref">BBBABBBBBBBBBBBBBBBB</p> 43 </section>