mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Fix string font names.
This commit is contained in:
parent
2c5de00ef3
commit
c4c923bdcf
1 changed files with 3 additions and 0 deletions
|
@ -807,6 +807,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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue