2d.text.writingmode.html (777B)
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.text.writingmode-expected.html"> 5 <title>Canvas test: 2d.text.writingmode</title> 6 <h1>2d.text.writingmode</h1> 7 <p class="desc">writing-mode in css should not change how text is rendered</p> 8 <canvas id="canvas" width="300" height="300"> 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 canvas.style.textOrientation = "upright"; 16 canvas.style.writingMode = "vertical-rl"; 17 canvas.style.fontFamily = "Arial"; 18 19 ctx.font = "bold 64px Arial"; 20 ctx.textBaseline = "top"; 21 22 ctx.fillText("Happy", 100, 0); 23 </script>