font-variant-alternates-16.html (1577B)
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: ornaments(); low level equivalence</title> 5 <link rel="author" title="Chris Lilley" href="chris@w3.org"> 6 <link rel="match" href="font-variant-alternates-16-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 replacement of default glyphs with ornaments, if provided in the font (font specific, OpenType feature: ornm <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 @ornaments { 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: ornaments(bar); 30 } 31 .low { 32 font-feature-settings: "hist" off, "salt" 00, "ss01" off, "ss02" off, "ss03" off, 33 "cv01" off, "cv02" off, "cv03" off, "swsh" 00, "cswh" 00, "ornm" 02, "nalt" 00; 34 } 35 </style> 36 <body> 37 38 <p>Test passes if the three lines below are identical, with seventeen crosses (✗), one check mark (✓) followed by two crosses (✗). </p> 39 <section class="test"> 40 <p class="high">Xnophijklmqrstuvwxyz</p> 41 <p class="low">Xnophijklmqrstuvwxyz</p> 42 <p class="ref">BBBBBBBBBBBBBBBBBABB</p> 43 </section>