mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Merge pull request #910 from notmasteryet/tree-46
Remove glyph references outside range of avaialable glyphs
This commit is contained in:
commit
7c5e1a2179
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;
|
||||
|
||||
|
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -17,3 +17,4 @@
|
|||
!devicen.pdf
|
||||
!cmykjpeg.pdf
|
||||
!issue840.pdf
|
||||
!freeculture.pdf
|
||||
|
|
BIN
test/pdfs/freeculture.pdf
Normal file
BIN
test/pdfs/freeculture.pdf
Normal file
Binary file not shown.
|
@ -87,6 +87,13 @@
|
|||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "freeculture",
|
||||
"file": "pdfs/freeculture.pdf",
|
||||
"md5": "dcdf3a8268e6a18938a42d5149efcfca",
|
||||
"rounds": 1,
|
||||
"pageLimit": 5,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "wnv_chinese-pdf",
|
||||
"file": "pdfs/wnv_chinese.pdf",
|
||||
"md5": "db682638e68391125e8982d3c984841e",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue