mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #1406 from 'bdahl/string_fontname'
Fix string font names.
This commit is contained in:
commit
19bc96a617
4 changed files with 2194 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue