tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

canvas.2d.lang.dynamic-ref.html (2194B)


      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  <style>
      8    #canvas1 {
      9      position: absolute;
     10      left: 0px;
     11      top: 0px;
     12    }
     13    #canvas2 {
     14      position: absolute;
     15      left: 0px;
     16      top: 50px;
     17    }
     18    #canvas3 {
     19      position: absolute;
     20      left: 0px;
     21      top: 100px;
     22    }
     23    #canvas4 {
     24      position: absolute;
     25      left: 0px;
     26      top: 150px;
     27    }
     28  </style>
     29  <script>
     30    function generateReference() {
     31      let test_font = new FontFace(
     32        // Lato-Medium is a font with language specific ligatures.
     33        "Lato-Medium",
     34        "url(/fonts/Lato-Medium.ttf)"
     35      );
     36 
     37      test_font.load().then((font) => {
     38        document.fonts.add(font);
     39        var canvas1 = document.getElementById('canvas1');
     40        var ctx1 = canvas1.getContext('2d');
     41        ctx1.font = '25px Lato-Medium';
     42        ctx1.fillText('fi', 60, 30);
     43 
     44        var canvas2 = document.getElementById('canvas2');
     45        var ctx2 = canvas2.getContext('2d');
     46        ctx2.font = '25px Lato-Medium';
     47        ctx2.fillText('fi', 60, 30);
     48 
     49        var canvas3 = document.getElementById('canvas3');
     50        var ctx3 = canvas3.getContext('2d');
     51        ctx3.font = '25px Lato-Medium';
     52        ctx3.fillText('fi', 60, 30);
     53 
     54        var canvas4 = document.getElementById('canvas4');
     55        var ctx4 = canvas4.getContext('2d');
     56        ctx4.font = '25px Lato-Medium';
     57        ctx4.fillText('fi', 60, 30);
     58        takeScreenshot();
     59      });
     60    }
     61  </script>
     62  <body onload="generateReference()">
     63    <canvas id="canvas1" lang="en" width="300" height="50">
     64      Browser does not support HTML5 Canvas.
     65    </canvas>
     66    <canvas id="canvas2" lang="tr" width="300" height="50">
     67      Browser does not support HTML5 Canvas.
     68    </canvas>
     69    <canvas id="canvas3" lang="en" width="300" height="50">
     70      Browser does not support HTML5 Canvas.
     71    </canvas>
     72    <canvas id="canvas4" lang="tr" width="300" height="50">
     73      Browser does not support HTML5 Canvas.
     74    </canvas>
     75  </body>
     76 </html>