mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Use the shadow method in Fonts.ctx
This commit is contained in:
parent
dd923d5aea
commit
91399b50ef
1 changed files with 1 additions and 2 deletions
3
fonts.js
3
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue