Merge pull request #910 from notmasteryet/tree-46

Remove glyph references outside range of avaialable glyphs
This commit is contained in:
Artur Adib 2011-12-08 07:01:31 -08:00
commit 7c5e1a2179
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;

View File

@ -17,3 +17,4 @@
!devicen.pdf
!cmykjpeg.pdf
!issue840.pdf
!freeculture.pdf

BIN
test/pdfs/freeculture.pdf Normal file

Binary file not shown.

View File

@ -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",