Merge pull request #488 from notmasteryet/issue-484-a

Fixing double metrics issue for glyphs (#484)
This commit is contained in:
Chris Jones 2011-09-17 19:42:13 -07:00
commit 537eb8f47b

8
pdf.js
View File

@ -4364,7 +4364,13 @@ var PartialEvaluator = (function() {
var lastChar = properties.lastChar;
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];
map[i] = {