]> git.parisson.com Git - pdf.js.git/commitdiff
properly fix font loading, shaon's code didn't work after all
authorAndreas Gal <andreas.gal@gmail.com>
Sat, 9 Jul 2011 01:45:38 +0000 (18:45 -0700)
committerAndreas Gal <andreas.gal@gmail.com>
Sat, 9 Jul 2011 01:45:38 +0000 (18:45 -0700)
fonts.js

index 072d75623b5fe161e4db4b77e3c4eeaa5ae8cf42..ec89b3a5863822f79f64581a8c26c9e7c53431f0 100755 (executable)
--- 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');