]> git.parisson.com Git - pdf.js.git/commitdiff
Merge branch 'master' of https://github.com/andreasgal/pdf.js.git into charstoglyphs
authornotmasteryet <async.processingjs@yahoo.com>
Sun, 18 Sep 2011 14:11:53 +0000 (09:11 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Sun, 18 Sep 2011 14:11:53 +0000 (09:11 -0500)
1  2 
fonts.js
pdf.js
test/test_manifest.json

diff --cc fonts.js
Simple merge
diff --cc pdf.js
index 5c3102b850ddaccc39ea374237ba4e72a26de5d2,1ee56e7ed7e7b150595c872f7dda2a286c7d0679..3b17992001cfb47dfaa147091a3b290b4895b8fc
--- 1/pdf.js
--- 2/pdf.js
+++ b/pdf.js
@@@ -4361,12 -4362,17 +4361,18 @@@ var PartialEvaluator = (function() 
        // merge in the differences
        var firstChar = properties.firstChar;
        var lastChar = properties.lastChar;
 +      var widths = properties.widths || [];
        var glyphs = {};
        for (var i = firstChar; i <= lastChar; i++) {
-         var glyph = differences[i] || baseEncoding[i];
+         var glyph = differences[i];
+         if (!glyph) {
+           glyph = baseEncoding[i];
+           // skipping already specified by difference glyphs
+           if (differences.indexOf(glyph) >= 0)
+             continue;
+         }
          var index = GlyphsUnicode[glyph] || i;
 -        var width = properties.widths[i] || properties.widths[glyph];
 +        var width = widths[i] || widths[glyph];
          map[i] = {
            unicode: index,
            width: IsNum(width) ? width : properties.defaultWidth
Simple merge