From 87b9f59ba44eacdef5482e189323b55175a35ce2 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 26 Jul 2020 18:05:38 +0200 Subject: [PATCH] Send/receive Type3 images the same way as other globally-cached images There's quite frankly no particular reason to special-case Type3-fonts with image resources, which is very rare anyway, now that we have a general mechanism for sending/receiving images globally. --- src/core/evaluator.js | 9 +-------- src/display/api.js | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 408a8af41643ea..7bbcc648ff36dc 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -455,14 +455,7 @@ class PartialEvaluator { _sendImgData(objId, imgData, cacheGlobally = false) { const transfers = imgData ? [imgData.data.buffer] : null; - if (this.parsingType3Font) { - return this.handler.send( - "commonobj", - [objId, "FontType3Res", imgData], - transfers - ); - } - if (cacheGlobally) { + if (this.parsingType3Font || cacheGlobally) { return this.handler.send( "commonobj", [objId, "Image", imgData], diff --git a/src/display/api.js b/src/display/api.js index b1fb4ba6128075..140dafc494010a 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -2265,7 +2265,6 @@ class WorkerTransport { }); break; case "FontPath": - case "FontType3Res": case "Image": this.commonObjs.resolve(id, exportedData); break;