From db5c454ca161ec081a1d57ceaa6a73e6a3f33a70 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Sat, 25 Jun 2011 11:52:42 +0200 Subject: [PATCH] Fix windows/mac font loading detection --- fonts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fonts.js b/fonts.js index 7af850514..6ac582b18 100644 --- a/fonts.js +++ b/fonts.js @@ -787,8 +787,8 @@ var Font = (function () { // This code could go away when bug 471915 has landed var canvas = document.createElement("canvas"); var ctx = canvas.getContext("2d"); - ctx.font = "bold italic 20px " + fontName + ", Symbol"; - var testString = " "; + ctx.font = "bold italic 20px " + fontName + ", Symbol, Arial"; + var testString = " "; // Periodicaly check for the width of the testString, it will be // different once the real font has loaded @@ -796,7 +796,7 @@ var Font = (function () { var interval = window.setInterval(function canvasInterval(self) { this.start = this.start || Date.now(); - ctx.font = "bold italic 20px " + fontName + ", Symbol"; + ctx.font = "bold italic 20px " + fontName + ", Symbol, Arial"; // For some reasons the font has not loaded, so mark it loaded for the // page to proceed but cry