variable-opsz.html (1311B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <link rel="author" title="Dominik Röttsches" href="drott@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-optical-sizing-def"/> 5 <meta name="assert" content="Ensures that optical size is automatically applied."/> 6 <link rel="match" href="variable-opsz-ref.html"> 7 <meta charset="utf-8"> 8 <style> 9 @font-face { 10 font-family: variabletest_box; 11 src: url(resources/variabletest_box.ttf); 12 } 13 14 body { 15 font-family: variabletest_box, sans-serif; 16 } 17 </style> 18 <!-- The variabletest_box font file contains a glyph for letter B which moves a 19 horizontal bar up from the middle for opsz > 12 and moves it down for opsz > 20 12 where the opsz axis ranges from 12 to 128. --> 21 <div style="font-size: 6px;">B</div> 22 <div style="font-size: 12px;">B</div> 23 <div style="font-size: 24px;">B</div> 24 <div style="font-size: 48px;">B</div> 25 <div style="font-size: 64px;">B</div> 26 <div style="font-size: 128px;">B</div> 27 <!-- Explicit value overrides auto. --> 28 <div style="font-size: 24px; font-variation-settings: 'opsz' 128;">B</div> 29 <div style="font-size: 48px; font-optical-sizing: none;">B</div> 30 <script> 31 document.fonts.ready.then( 32 () => { document.documentElement.classList.remove("reftest-wait"); }); 33 </script> 34 </html>