Fixing double metrics issue for glyphs (#484)

This commit is contained in:
notmasteryet 2011-09-16 22:49:43 -05:00
parent 82745def0a
commit fc574f646a

8
pdf.js
View File

@ -4357,7 +4357,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] = {