[Pkg-javascript-commits] [pdf.js] 48/141: Workaround for cases where FontName in the FontDescriptor differs from BaseFont in the Font (bug 847420)

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 22:40:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 811f1b1d05593a5dac296d58d84047cf299a9acb
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Tue Apr 8 22:49:51 2014 +0200

    Workaround for cases where FontName in the FontDescriptor differs from BaseFont in the Font (bug 847420)
---
 src/core/evaluator.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/core/evaluator.js b/src/core/evaluator.js
index d8ce942..e049333 100644
--- a/src/core/evaluator.js
+++ b/src/core/evaluator.js
@@ -1219,6 +1219,12 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
           info('The FontDescriptor\'s FontName is "' + fontNameStr +
                '" but should be the same as the Font\'s BaseFont "' +
                baseFontStr + '"');
+          // Workaround for cases where e.g. fontNameStr = 'Arial' and
+          // baseFontStr = 'Arial,Bold' (needed when no font file is embedded).
+          if (fontNameStr && baseFontStr &&
+              baseFontStr.search(fontNameStr) === 0) {
+            fontName = baseFont;
+          }
         }
       }
       fontName = (fontName || baseFont);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list