Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<meta charset="UTF-8">
<title>Canvas test: 2d.text.shape.fillGlyphRuns-and-strokeGlyphRuns.tentative</title>
<h1>2d.text.shape.fillGlyphRuns-and-strokeGlyphRuns.tentative</h1>
<p class="desc">Test that fillGlyphRuns(st.glyphRuns(), x, y) and strokeGlyphRuns(st.glyphRuns(), x, y) match fillText() and strokeText() across mixed bidi and fallback runs.</p>
<canvas id="canvas" width="300" height="100">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext('2d');
ctx.font = '20px serif';
const text = 'Test ☺️ א World';
ctx.fillText(text, 10, 35);
ctx.strokeText(text, 10, 75);
</script>