blob: fba6bce070a2a5dfbc948a8b3ed21822002b6573 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Canvas 2d Context Font Property Speed</title>
</head>
<body>
<canvas id='thecanvas' height=100 width=100/>
<script>
var canvas = document.getElementById('thecanvas');
var context = canvas.getContext('2d');
var t0 = Date.now();
for (var i = 0; i < 1000; i++) {
context.font = 'bold 13px Arial';
}
alert('Elapsed for 1000 font settings: ' + (Date.now() - t0));
</script>
</body>
</html>