1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <title>Canvas
2d Context Font Property Speed
</title>
7 <canvas id='thecanvas' height=
100 width=
100/>
9 var canvas
= document
.getElementById('thecanvas');
10 var context
= canvas
.getContext('2d');
12 for (var i
= 0; i
< 1000; i
++) {
13 context
.font
= 'bold 13px Arial';
15 alert('Elapsed for 1000 font settings: ' + (Date
.now() - t0
));