deal with apparent lack of FontDescriptor for standard fonts
This commit is contained in:
parent
7f582fb322
commit
5dc5455959
7
pdf.js
7
pdf.js
@ -2343,7 +2343,12 @@ var CanvasGraphics = (function() {
|
|||||||
|
|
||||||
constructor.prototype = {
|
constructor.prototype = {
|
||||||
translateFont: function(fontDict, xref, resources) {
|
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");
|
var fontName = descriptor.get("FontName");
|
||||||
assertWellFormed(IsName(fontName), "invalid font name");
|
assertWellFormed(IsName(fontName), "invalid font name");
|
||||||
|
3
test.py
3
test.py
@ -287,9 +287,10 @@ def processResults():
|
|||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
masterMode = False
|
masterMode = False
|
||||||
|
manifestFile = DEFAULT_MANIFEST_FILE
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
masterMode = (args[0] == '-m')
|
masterMode = (args[0] == '-m')
|
||||||
manifestFile = args[0] if not masterMode else DEFAULT_MANIFEST_FILE
|
manifestFile = args[0] if not masterMode else manifestFile
|
||||||
|
|
||||||
setUp(manifestFile, masterMode)
|
setUp(manifestFile, masterMode)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user