fontface-size-adjust-descriptor.html (924B)
1 <!DOCTYPE html> 2 <title>Tests that the sizeAdjust attribute of FontFace works</title> 3 <meta charset="utf-8"> 4 <link rel="author" href="mailto:jkew@mozilla.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-font-loading/#fontface-interface"> 6 <link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-size-adjust-desc"> 7 <link rel="match" href="fontface-size-adjust-descriptor-ref.html"> 8 <script> 9 const ahem = new FontFace( 10 'Ahem-normal', 11 'local("Ahem"), url("/fonts/Ahem.ttf")'); 12 document.fonts.add(ahem); 13 const large = new FontFace( 14 'Ahem-large', 15 'local("Ahem"), url("/fonts/Ahem.ttf")', 16 {sizeAdjust: "200%", unicodeRange: "U+20,U+41-5A"}); 17 document.fonts.add(large); 18 </script> 19 <style> 20 #target { 21 font-family: "Ahem-large", "Ahem-normal"; 22 font-size: 20px; 23 letter-spacing: 10px; 24 } 25 </style> 26 27 <p>The first and fourth characters should be double-sized:</p> 28 <div id="target"> 29 FooBar 30 </div>