]> git.parisson.com Git - pdf.js.git/commitdiff
Get Type3 fonts working again.
authorJulian Viereck <julian.viereck@gmail.com>
Sat, 8 Oct 2011 20:35:35 +0000 (22:35 +0200)
committerJulian Viereck <julian.viereck@gmail.com>
Sat, 8 Oct 2011 20:46:23 +0000 (22:46 +0200)
pdf.js
worker.js

diff --git a/pdf.js b/pdf.js
index 2e4edef6982d0becc4d5ac70ad938e4aa17b1373..f016ff4424575e2b9da0360a9f14fb7b1bdaeae4 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4687,7 +4687,8 @@ var PartialEvaluator = (function partialEvaluator() {
           var font = xref.fetchIfRef(fontRes.get(fontName));
           assertWellFormed(isDict(font));
           if (!font.translated) {
-            font.translated = self.translateFont(font, xref, resources);
+            font.translated = self.translateFont(font, xref, resources, handler, 
+                          uniquePrefix, dependency);
             if (font.translated) {
               // keep track of each font we translated so the caller can
               // load them asynchronously before calling display on a page
@@ -5279,7 +5280,7 @@ var PartialEvaluator = (function partialEvaluator() {
     },
 
     translateFont: function partialEvaluatorTranslateFont(dict, xref,
-                                                          resources) {
+                                                          resources, queue, handler, uniquePrefix, dependency) {
       var baseDict = dict;
       var type = dict.get('Subtype');
       assertWellFormed(isName(type), 'invalid font Subtype');
@@ -5424,9 +5425,9 @@ var PartialEvaluator = (function partialEvaluator() {
         properties.resources = fontResources;
         for (var key in charProcs.map) {
           var glyphStream = xref.fetchIfRef(charProcs.map[key]);
-          properties.glyphs[key].code = this.evaluate(glyphStream,
-                                                       xref,
-                                                       fontResources);
+          var queue = {};
+          properties.glyphs[key].IRQueue = this.getIRQueue(glyphStream,
+                                        xref, fontResources, queue, handler, uniquePrefix, dependency);
         }
       }
 
@@ -5925,7 +5926,7 @@ var CanvasGraphics = (function canvasGraphics() {
           this.save();
           ctx.scale(fontSize, fontSize);
           ctx.transform.apply(ctx, fontMatrix);
-          this.execute(glyph.code, this.xref, font.resources);
+          this.executeIRQueue(glyph.IRQueue);
           this.restore();
 
           var transformed = Util.applyTransform([glyph.width, 0], fontMatrix);
index e81acf271a22f1647659138b7eb87900f51908d2..9aaf294100c7da3ff1b7312206548add81debd29 100644 (file)
--- a/worker.js
+++ b/worker.js
@@ -4,7 +4,7 @@
 'use strict';
 
 // Set this to true if you want to use workers.
-var useWorker = true;
+var useWorker = false;
 
 var WorkerPage = (function() {
   function constructor(workerPDF, page, objs) {