tor-browser

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

2d.reset.render.text.html (970B)


      1 <!DOCTYPE html>
      2 <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
      3 <meta charset="UTF-8">
      4 <link rel="match" href="2d.reset.render.text-expected.html">
      5 <title>Canvas test: 2d.reset.render.text</title>
      6 <h1>2d.reset.render.text</h1>
      7 <p class="desc">check that text is correctly rendered after reset</p>
      8 <canvas id="canvas" width="400" height="400">
      9  <p class="fallback">FAIL (fallback content)</p>
     10 </canvas>
     11 <script>
     12  const canvas = document.getElementById("canvas");
     13  const ctx = canvas.getContext('2d');
     14 
     15  ctx.font = "24px serif";
     16  ctx.textAlign = "center";
     17  ctx.textBaseline = "hanging";
     18  ctx.direction = "rtl";
     19  ctx.letterSpacing = "10px";
     20  ctx.fontKerning = "none";
     21  ctx.fontStretch = "semi-condensed";
     22  ctx.fontVariantCaps = "titling-caps";
     23  ctx.textRendering = "optimizeLegibility";
     24  ctx.wordSpacing = "20px";
     25 
     26  ctx.reset();
     27 
     28  ctx.fillText("Lorem ipsum dolor sit amet, consectetur adipiscing elit", 0, 10);
     29 </script>