Browse Source

Added font state test

v1.x
Tj Holowaychuk 15 years ago
parent
commit
0ab0e144d7
  1. 16
      test/public/tests.js

16
test/public/tests.js

@ -1370,4 +1370,20 @@ tests['shadow integration'] = function(ctx){
ctx.arc(50, 151, 50, 0, Math.PI*2, false);
ctx.fillStyle = "gold";
ctx.fill();
};
tests['font state'] = function(ctx){
ctx.save();
ctx.font = '20px Impact';
ctx.fillText('Bam!', 50, 80);
ctx.save();
ctx.font = '10px Arial';
ctx.fillText('Boom!', 50, 100);
ctx.restore();
ctx.fillText('Bam again!', 50, 120);
ctx.restore();
ctx.fillText('Boom again!', 50, 140);
};
Loading…
Cancel
Save