canvas.2d.lang.empty-ref.html (1078B)
1 <!doctype HTML> 2 <html class="reftest-wait"> 3 <meta charset="utf-8"> 4 <title>HTML5 Canvas Test Reference: The lang attribute.</title> 5 <link rel="author" href="mailto:schenney@chromium.org"/> 6 <script src="/common/reftest-wait.js"></script> 7 <script> 8 function generateReference() { 9 let test_font = new FontFace( 10 // Lato-Medium is a font with language specific ligatures. 11 "Lato-Medium", 12 "url(/fonts/Lato-Medium.ttf)" 13 ); 14 15 test_font.load().then((font) => { 16 document.fonts.add(font); 17 var canvas = document.getElementById('canvas1'); 18 var ctx = canvas.getContext('2d'); 19 20 // With no lang defined anywhere, this reference will use the unknown 21 // language, whatever that might produce on the platform. 22 ctx.font = '25px Lato-Medium'; 23 ctx.fillText('fi', 5, 50); 24 takeScreenshot(); 25 }); 26 } 27 </script> 28 <body onload="generateReference()"> 29 <canvas id="canvas1" width="300" height="150"> 30 Browser does not support HTML5 Canvas. 31 </canvas> 32 </body> 33 </html>