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:
parent
cb592d6e51
commit
fa18c8022e
4 changed files with 14 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue