Browse Source

remove glyph references outside range of avaialable glyphs

notmasteryet 14 years ago
parent
commit
fa18c8022e
  1. 6
      src/fonts.js
  2. 1
      test/pdfs/.gitignore
  3. BIN
      test/pdfs/freeculture.pdf
  4. 7
      test/test_manifest.json

6
src/fonts.js

@ -1785,6 +1785,12 @@ var Font = (function Font() { @@ -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

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

BIN
test/pdfs/freeculture.pdf

Binary file not shown.

7
test/test_manifest.json

@ -87,6 +87,13 @@ @@ -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…
Cancel
Save