Browse Source

Merge pull request #3265 from yurydelendik/issue-3263

Ensure we don't modify the original PDF data when sanitizing TrueType
Brendan Dahl 12 years ago
parent
commit
59d0ccf64b
  1. 3
      src/fonts.js
  2. 1
      test/pdfs/issue3263.pdf.link
  3. 9
      test/test_manifest.json

3
src/fonts.js

@ -3870,6 +3870,9 @@ var Font = (function FontClosure() {
} }
} }
// The following steps modify the original font data, making copy
font = new Stream(new Uint8Array(font.getBytes()));
// Check that required tables are present // Check that required tables are present
var requiredTables = ['OS/2', 'cmap', 'head', 'hhea', var requiredTables = ['OS/2', 'cmap', 'head', 'hhea',
'hmtx', 'maxp', 'name', 'post']; 'hmtx', 'maxp', 'name', 'post'];

1
test/pdfs/issue3263.pdf.link

@ -0,0 +1 @@
http://visionmedia.dev.cervantesvirtual.com/web/220816.pdf

9
test/test_manifest.json

@ -1113,6 +1113,15 @@
"rounds": 1, "rounds": 1,
"type": "eq" "type": "eq"
}, },
{ "id": "issue3263",
"file": "pdfs/issue3263.pdf",
"md5": "cee1cf0bd7ce6681cdb97c8e42697d81",
"rounds": 1,
"link": true,
"firstPage": 18,
"lastPage": 19,
"type": "eq"
},
{ "id": "issue2761", { "id": "issue2761",
"file": "pdfs/issue2761.pdf", "file": "pdfs/issue2761.pdf",
"md5": "35df0b8cff4afec0c08f08c6a5bc9857", "md5": "35df0b8cff4afec0c08f08c6a5bc9857",

Loading…
Cancel
Save