remove glyph references outside range of avaialable glyphs
This commit is contained in:
parent
cb592d6e51
commit
fa18c8022e
@ -1785,6 +1785,12 @@ var Font = (function Font() {
|
|||||||
}
|
}
|
||||||
properties.hasShortCmap = hasShortCmap;
|
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);
|
createGlyphNameMap(glyphs, ids, properties);
|
||||||
this.glyphNameMap = properties.glyphNameMap;
|
this.glyphNameMap = properties.glyphNameMap;
|
||||||
|
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -17,3 +17,4 @@
|
|||||||
!devicen.pdf
|
!devicen.pdf
|
||||||
!cmykjpeg.pdf
|
!cmykjpeg.pdf
|
||||||
!issue840.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,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "freeculture",
|
||||||
|
"file": "pdfs/freeculture.pdf",
|
||||||
|
"md5": "dcdf3a8268e6a18938a42d5149efcfca",
|
||||||
|
"rounds": 1,
|
||||||
|
"pageLimit": 5,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "wnv_chinese-pdf",
|
{ "id": "wnv_chinese-pdf",
|
||||||
"file": "pdfs/wnv_chinese.pdf",
|
"file": "pdfs/wnv_chinese.pdf",
|
||||||
"md5": "db682638e68391125e8982d3c984841e",
|
"md5": "db682638e68391125e8982d3c984841e",
|
||||||
|
Loading…
Reference in New Issue
Block a user