Use the shadow method in Fonts.ctx
This commit is contained in:
parent
dd923d5aea
commit
91399b50ef
3
fonts.js
3
fonts.js
@ -84,10 +84,9 @@ var Fonts = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get ctx() {
|
get ctx() {
|
||||||
delete this.ctx;
|
|
||||||
var ctx = document.createElement("canvas").getContext("2d");
|
var ctx = document.createElement("canvas").getContext("2d");
|
||||||
ctx.scale(1 / kScalePrecision, 1);
|
ctx.scale(1 / kScalePrecision, 1);
|
||||||
return this.ctx = ctx;
|
return shadow(this, "ctx", ctx);
|
||||||
},
|
},
|
||||||
|
|
||||||
measureText: function fonts_measureText(text) {
|
measureText: function fonts_measureText(text) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user