From d4a42a4e79dc920efea07057b0c21281a5ccb162 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 18 Jun 2011 22:04:36 -0700 Subject: [PATCH] mozMeasureText() is non-standard and deprecated --- fonts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fonts.js b/fonts.js index 7978cd60d..6c643ae40 100644 --- a/fonts.js +++ b/fonts.js @@ -203,7 +203,7 @@ Font.prototype = { } } ctx.font = "bold italic 20px " + fontName + ", Symbol, Arial"; - var textWidth = ctx.mozMeasureText(testString); + var textWidth = ctx.measureText(testString).width; if (debug) ctx.fillText(testString, 20, 20); @@ -218,7 +218,7 @@ Font.prototype = { window.clearInterval(interval); Fonts[fontName].loading = false; warn("Is " + fontName + " for charset: " + charset + " loaded?"); - } else if (textWidth != ctx.mozMeasureText(testString)) { + } else if (textWidth != ctx.measureText(testString).width) { window.clearInterval(interval); Fonts[fontName].loading = false; }