1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

remove glyph references outside range of avaialable glyphs

This commit is contained in:
notmasteryet 2011-12-07 21:38:34 -06:00
parent cb592d6e51
commit fa18c8022e
4 changed files with 14 additions and 0 deletions

View file

@ -1785,6 +1785,12 @@ var Font = (function Font() {
}
properties.hasShortCmap = hasShortCmap;
// remove glyph references outside range of avaialable glyphs
for (var i = 0, ii = ids.length; i < ii; i++) {
if (ids[i] >= numGlyphs)
ids[i] = 0;
}
createGlyphNameMap(glyphs, ids, properties);
this.glyphNameMap = properties.glyphNameMap;