Merge pull request #1406 from 'bdahl/string_fontname'

Fix string font names.
This commit is contained in:
notmasteryet 2012-03-26 21:17:16 -05:00
commit 19bc96a617
4 changed files with 2194 additions and 0 deletions

View File

@ -805,6 +805,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
var firstChar = xref.fetchIfRef(dict.get('FirstChar')) || 0;
var lastChar = xref.fetchIfRef(dict.get('LastChar')) || maxCharIndex;
var fontName = xref.fetchIfRef(descriptor.get('FontName'));
// Some bad pdf's have a string as the font name.
if (isString(fontName))
fontName = new Name(fontName);
assertWellFormed(isName(fontName), 'invalid font name');
var fontFile = descriptor.get('FontFile', 'FontFile2', 'FontFile3');

View File

@ -25,6 +25,7 @@
!issue1249.pdf
!smaskdim.pdf
!type4psfunc.pdf
!issue1350.pdf
!S2.pdf
!zerowidthline.pdf
!issue1002.pdf

2184
test/pdfs/issue1350.pdf Normal file

File diff suppressed because one or more lines are too long

View File

@ -488,6 +488,12 @@
"link": true,
"type": "eq"
},
{ "id": "issue1350",
"file": "pdfs/issue1350.pdf",
"md5": "92f72a04a4d9d05b2dd433b51f32ab1f",
"rounds": 1,
"type": "eq"
},
{ "id": "issue925",
"file": "pdfs/issue925.pdf",
"md5": "f58fe943090aff89dcc8e771bc0db4c2",