From f1e8b23f307752f343bdb9080fa6aeb61611c3f5 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Sat, 18 Jun 2011 21:54:53 +0200 Subject: [PATCH] Use measureText instead of mozMeasureText (deprecated) --- fonts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fonts.js b/fonts.js index 951cbd0ed..16c1246d9 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); 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)) { window.clearInterval(interval); Fonts[fontName].loading = false; }