]> git.parisson.com Git - pdf.js.git/commitdiff
clarify API a bit and hand in xref and resources to ease translation
authorAndreas Gal <andreas.gal@gmail.com>
Wed, 15 Jun 2011 06:44:59 +0000 (23:44 -0700)
committerAndreas Gal <andreas.gal@gmail.com>
Wed, 15 Jun 2011 06:44:59 +0000 (23:44 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index 633437e7e0f01027b651a7c70d7d56a193122aa9..6e6935f1324154be35748903fc33373a6ac68ded 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -1683,8 +1683,8 @@ var CanvasGraphics = (function() {
     const EO_CLIP = {};
 
     constructor.prototype = {
-        translateFont: function(fontDict) {
-            return fontDict;
+        translateFont: function(fontDict, xref, resources) {
+            return "translated";
         },
 
         beginDrawing: function(mediaBox) {
@@ -1758,7 +1758,7 @@ var CanvasGraphics = (function() {
                             var font = xref.fetchIfRef(fontRes.get(args[0].name));
                             assertWellFormed(IsDict(font));
                             if (!font.translated) {
-                                font.translated = this.translateFont(font);
+                                font.translated = this.translateFont(font, xref, resources);
                                 if (fonts && font.translated) {
                                     // keep track of each font we translated so the caller can
                                     // load them asynchronously before calling display on a page