]> git.parisson.com Git - pdf.js.git/commitdiff
Ensure fonts loaded in caes you load fonts out of line
authorJulian Viereck <julian.viereck@gmail.com>
Thu, 15 Sep 2011 22:08:53 +0000 (15:08 -0700)
committerJulian Viereck <julian.viereck@gmail.com>
Thu, 15 Sep 2011 22:08:53 +0000 (15:08 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index d72b422fb251fdf7dd5305d2a31fdff9b97504ec..ef6e04188c39ddb57cd513d3989c3b2581b8d314 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4349,13 +4349,15 @@ var PartialEvaluator = (function() {
                       font.translated.file,
                       font.translated.properties
                   ]);
-
-                  // Ensure the font is ready before the font is set
-                  // and later on used for drawing.
-                  insertDependency([loadedName]);
                 }
               }
               args[0].name = font.translated.properties.loadedName;
+              
+              // Ensure the font is ready before the font is set
+              // and later on used for drawing.
+              // TODO: This should get insert to the IRQueue only once per
+              // page.
+              insertDependency([font.translated.properties.loadedName]);
             } else {
               // TODO: TOASK: Is it possible to get here? If so, what does
               // args[0].name should be like???