Skip to content

Commit

Permalink
Send/receive Type3 images the same way as other globally-cached images
Browse files Browse the repository at this point in the history
There's quite frankly no particular reason to special-case Type3-fonts with image resources, which are very rare anyway, now that we have a general mechanism for sending/receiving images globally.
  • Loading branch information
Snuffleupagus committed Jul 26, 2020
1 parent f93f5bc commit 4fad4d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 1 addition & 8 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
1 change: 0 additions & 1 deletion src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2265,7 +2265,6 @@ class WorkerTransport {
});
break;
case "FontPath":
case "FontType3Res":
case "Image":
this.commonObjs.resolve(id, exportedData);
break;
Expand Down

0 comments on commit 4fad4d6

Please sign in to comment.