]> git.parisson.com Git - pdf.js.git/commitdiff
Merge branch 'master' of https://github.com/andreasgal/pdf.js.git into tree-22
authornotmasteryet <async.processingjs@yahoo.com>
Thu, 22 Sep 2011 01:00:35 +0000 (20:00 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Thu, 22 Sep 2011 01:00:35 +0000 (20:00 -0500)
Conflicts:
pdf.js

1  2 
pdf.js

diff --cc pdf.js
index 7e56c309f72170cc8370d6eb4088d7f59da0b41d,ac58ec0d8c7a6d4a7307dd0ef622295758e290ac..f6f4a3b52087c1242582f2fd8f116a8ef83eb499
--- 1/pdf.js
--- 2/pdf.js
+++ b/pdf.js
@@@ -4483,33 -4490,8 +4490,34 @@@ var PartialEvaluator = (function partia
        return glyphs;
      },
  
-     translateFont: function(dict, xref, resources) {
 +    getBaseFontMetrics: function(baseFontName) {
 +      var map = {};
 +      if (/^Symbol(-?(Bold|Italic))*$/.test(baseFontName)) {
 +        // special case for symbols
 +        var encoding = Encodings.symbolsEncoding;
 +        for (var i = 0, n = encoding.length, j; i < n; i++) {
 +          if (!(j = encoding[i]))
 +            continue;
 +          map[i] = GlyphsUnicode[j] || 0;
 +        }
 +      }
 +
 +      var defaultWidth = 0;
 +      var widths = Metrics[stdFontMap[baseFontName] || baseFontName];
 +      if (IsNum(widths)) {
 +        defaultWidth = widths;
 +        widths = null;
 +      }
 +
 +      return {
 +        defaultWidth: defaultWidth,
 +        widths: widths || [],
 +        map: map
 +      };
 +    },
 +
+     translateFont: function partialEvaluatorTranslateFont(dict, xref,
+                                                           resources) {
        var baseDict = dict;
        var type = dict.get('Subtype');
        assertWellFormed(IsName(type), 'invalid font Subtype');