canvas-filltext-stroketext

Benchmark created by Ilmari on


Preparation HTML

<script>
  var c = document.createElement('canvas');
  c.width = c.height = 512;
  var ctx = c.getContext('2d');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
fixed size fill aligned
ctx.fillText("test string", 0, 128);
ready
fixed size fill offset
ctx.fillText("test string", 0, 128.5);
ready
fixed size stroke aligned
ctx.strokeText("test string", 0, 128);
ready
fixed size stroke offset
ctx.strokeText("test string", 0, 128.5);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.