From: Vivien Nicolas <21@vingtetun.org> Date: Wed, 29 Jun 2011 01:00:23 +0000 (+0200) Subject: Use the shadow method in Fonts.ctx X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=91399b50ef971cc4479866c4340017cca8e28ba7;p=pdf.js.git Use the shadow method in Fonts.ctx --- diff --git a/fonts.js b/fonts.js index 19d16cb..e25b2ae 100644 --- a/fonts.js +++ b/fonts.js @@ -84,10 +84,9 @@ var Fonts = { }, get ctx() { - delete this.ctx; var ctx = document.createElement("canvas").getContext("2d"); ctx.scale(1 / kScalePrecision, 1); - return this.ctx = ctx; + return shadow(this, "ctx", ctx); }, measureText: function fonts_measureText(text) {