font-variant-position-04.html (1054B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <meta charset="utf-8"/> 4 <title>CSS Test: font-variant-position must synthesize super/subscripts for unsupported characters</title> 5 <link rel="mismatch" href="font-variant-position-04-notref.html"> 6 <meta name="assert" content="In the case of OpenType fonts that lack subscript or superscript glyphs for a given character, user agents must synthesize appropriate subscript and superscript glyphs"> 7 <link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-variant-position-prop"> 8 9 <style> 10 /* Lato has superscript Latin letters, but not subscript ones; 11 * digits are available in both super- and subscript form. 12 */ 13 @font-face { 14 font-family: "lato"; 15 src: url(/fonts/Lato-Medium.ttf); 16 } 17 .test { 18 font-family: "lato"; 19 font-size: 2em; 20 } 21 .sub { 22 font-variant-position: sub; 23 } 24 </style> 25 26 <section class="test"> 27 <p>Synthetic subscript letters <em>must</em> be used:</p> 28 <p>Text with <span class="sub">subscript</span> letters</p> 29 </section>