Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<meta charset="UTF-8">
<link rel="match" href="2d.text.drawing.style.reset.fontKerning.none2-expected.html">
<title>Canvas test: 2d.text.drawing.style.reset.fontKerning.none2</title>
<h1>2d.text.drawing.style.reset.fontKerning.none2</h1>
<p class="desc">FontKerning value still applies after font changes.</p>
<canvas id="canvas" width="100" height="50">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
<script>
const canvas = new OffscreenCanvas(100, 50);
const ctx = canvas.getContext('2d');
ctx.font = '10px serif';
ctx.fontKerning = "none";
ctx.font = '20px serif';
ctx.fillText("TATATA", 20, 30);
const outputCanvas = document.getElementById("canvas");
outputCanvas.getContext('2d').drawImage(canvas, 0, 0);
</script>