From 9d3e046a4f54be27adf5857651fd706677276c76 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 16 Aug 2020 17:32:15 +0200 Subject: [PATCH] Don't cache /ExtGState entries that contain fonts (PR 12087 follow-up) I completely overlooked the fact that `PartialEvaluator.handleSetFont` also updates the current `state`, which means that currently we're not actually handling font data correctly for cached /ExtGState data. (Thankfully, using /ExtGState to set a font is somewhat rare in practice.) --- src/core/evaluator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/evaluator.js b/src/core/evaluator.js index ea1d2ae54..72b69cbcf 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -846,6 +846,8 @@ class PartialEvaluator { gStateObj.push([key, value]); break; case "Font": + isSimpleGState = false; + promise = promise.then(() => { return this.handleSetFont( resources,