]> git.parisson.com Git - pdf.js.git/commitdiff
fix some bugs
authorChris Jones <jones.chris.g@gmail.com>
Tue, 5 Jul 2011 03:28:44 +0000 (23:28 -0400)
committerChris Jones <jones.chris.g@gmail.com>
Tue, 5 Jul 2011 03:28:44 +0000 (23:28 -0400)
fonts.js
pdf.js
test/driver.js

index 735213f5bff89565c0134c672a618c9657594fbb..47aeabc3ff163bde76e1d63f492dfb4cfc9daf91 100644 (file)
--- a/fonts.js
+++ b/fonts.js
@@ -1807,8 +1807,8 @@ CFF.prototype = {
         var data =
             "\x8b\x14" + // defaultWidth
             "\x8b\x15" + // nominalWidth
-            self.encodeNumber(properties.stdHW) + "\x0a" + // StdHW
-            self.encodeNumber(properties.stdVW) + "\x0b";  // StdVW
+            self.encodeNumber(properties.stdHW || 0) + "\x0a" + // StdHW
+            self.encodeNumber(properties.stdVW || 0) + "\x0b";  // StdVW
 
         var stemH = properties.stemSnapH;
         for (var i = 0; i < stemH.length; i++)
diff --git a/pdf.js b/pdf.js
index 48fa004e6424856be67432b567e4ddef5fa04642..5644bf0360ba0863546160b951f3c2760a07ec4f 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -3875,7 +3875,7 @@ var CanvasGraphics = (function() {
                 this.ctx.translate(this.current.x, -1 * this.current.y);
 
                 var font = Fonts.lookup(this.current.fontName);
-                if (font)
+                if (font && font.properties.textMatrix)
                   this.ctx.transform.apply(this.ctx, font.properties.textMatrix);
 
                 this.ctx.fillText(text, 0, 0);
index baa7358fda6dbc26b34481593eb0d26f94931c36..b4c2c64e03707a65e228253d1f30674dde682847 100644 (file)
@@ -152,7 +152,7 @@ function snapshotCurrentPage(gfx, page, task, failure) {
     }
 
     sendTaskResult(canvas.toDataURL("image/png"), task, failure);
-    log("done"+ (failure ? " (failed!)" : "") +"\n");
+    log("done"+ (failure ? " (failed!: "+ failure +")" : "") +"\n");
     
     // Set up the next request
     backoff = (inFlightRequests > 0) ? inFlightRequests * 10 : 0;