var glyphs = {};
for (var i = firstChar; i <= lastChar; i++) {
var glyph = differences[i];
+ var replaceGlyph = true;
if (!glyph) {
glyph = baseEncoding[i];
- // skipping already specified by difference glyphs
- if (differences.indexOf(glyph) >= 0)
- continue;
+ replaceGlyph = false;
}
var index = GlyphsUnicode[glyph] || i;
var width = widths[i] || widths[glyph];
width: isNum(width) ? width : properties.defaultWidth
};
- if (glyph)
- glyphs[glyph] = map[i];
+ if (glyph) {
+ if (replaceGlyph || !glyphs[glyph])
+ glyphs[glyph] = map[i];
+ }
// If there is no file, the character mapping can't be modified
// but this is unlikely that there is any standard encoding with