diff --git a/src/display/canvas.js b/src/display/canvas.js index 6bc9b4f48eec4..6ca42a0f3f607 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -3079,7 +3079,7 @@ class CanvasGraphics { this.save(); // Reset inherited alpha for colored (d0) glyphs (issue 21430). if (operatorList.fnArray[0] === OPS.setCharWidth) { - current.fillAlpha = current.strokeAlpha = 1; + this.current.fillAlpha = this.current.strokeAlpha = 1; ctx.globalAlpha = 1; } ctx.scale(fontSize, fontSize); diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 2dfa3e64b517c..6cdc459821b50 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -975,3 +975,4 @@ !crypt_filters.pdf !bug2082236.pdf !autoprint_will_print.pdf +!type3_d0_alpha.pdf diff --git a/test/pdfs/type3_d0_alpha.pdf b/test/pdfs/type3_d0_alpha.pdf new file mode 100644 index 0000000000000..2dcb254fc980d Binary files /dev/null and b/test/pdfs/type3_d0_alpha.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 6d983887fa905..82e4688af2bb8 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -14750,5 +14750,13 @@ "type": "eq", "annotations": true, "about": "NoRotate FreeText annotation on a page with /Rotate 270." + }, + { + "id": "type3_d0_alpha", + "file": "pdfs/type3_d0_alpha.pdf", + "md5": "f0273a0ba9c41b5f5033ca86fff062f0", + "rounds": 1, + "type": "eq", + "about": "Colored Type3 glyph followed by a semi-transparent stroke and fill." } ]