From 5bf4fcba9bae5b3f905af98b0e85a59ec23e724e Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Fri, 8 Jul 2011 18:45:38 -0700 Subject: [PATCH] properly fix font loading, shaon's code didn't work after all --- fonts.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fonts.js b/fonts.js index 072d75623..ec89b3a58 100755 --- a/fonts.js +++ b/fonts.js @@ -154,9 +154,8 @@ var FontLoader = { 'message', function(e) { var fontNames = JSON.parse(e.data); - // set all the fonts to loaded (not sure if this is correct) - for (var i = 0; i < ids.length; ++i) { - var font = Fonts.lookupById(ids[i]); + for (var i = 0; i < fontNames.length; ++i) { + var font = Fonts.lookupById(fontNames[i].substring(7) | 0); font.loading = false; } var evt = document.createEvent('Events');