mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 17:18:07 +02:00
deal with apparent lack of FontDescriptor for standard fonts
This commit is contained in:
parent
7f582fb322
commit
5dc5455959
2 changed files with 8 additions and 2 deletions
7
pdf.js
7
pdf.js
|
@ -2343,7 +2343,12 @@ var CanvasGraphics = (function() {
|
|||
|
||||
constructor.prototype = {
|
||||
translateFont: function(fontDict, xref, resources) {
|
||||
var descriptor = xref.fetch(fontDict.get("FontDescriptor"));
|
||||
var fd = fontDict.get("FontDescriptor");
|
||||
if (!fd)
|
||||
// XXX deprecated "special treatment" for standard
|
||||
// fonts? What do we need to do here?
|
||||
return;
|
||||
var descriptor = xref.fetch(fd);
|
||||
|
||||
var fontName = descriptor.get("FontName");
|
||||
assertWellFormed(IsName(fontName), "invalid font name");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue