font-variant-position-05.html (1186B)
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-05-notref.html"> 6 <meta name="assert" content="if a variant glyph is not available for all the characters in the run, simulated glyphs should be synthesized for all characters"> 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 .super { 22 font-variant-position: super; 23 } 24 </style> 25 26 <section class="test"> 27 <p>Synthetic superscript characters <em>must</em> be used:</p> 28 <!-- Note that Lato does not have a superscript alternate for the space or period! 29 Therefore, the entire superscript run should be synthesized. --> 30 <p>Text with <span class="super">superscript 3.14</span></p> 31 </section>