Browse Source

Merge pull request #5422 from Snuffleupagus/issue-5421

Avoid rendering invisible Type3 fonts (issue 5421)
Yury Delendik 11 years ago
parent
commit
92d3d7fd2e
  1. 4
      src/display/canvas.js
  2. 1
      test/pdfs/.gitignore
  3. BIN
      test/pdfs/issue5421.pdf
  4. 8
      test/test_manifest.json

4
src/display/canvas.js

@ -1463,9 +1463,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -1463,9 +1463,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
var textHScale = current.textHScale * fontDirection;
var fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;
var glyphsLength = glyphs.length;
var isTextInvisible =
current.textRenderingMode === TextRenderingMode.INVISIBLE;
var i, glyph, width;
if (fontSize === 0) {
if (isTextInvisible || fontSize === 0) {
return;
}

1
test/pdfs/.gitignore vendored

@ -65,6 +65,7 @@ @@ -65,6 +65,7 @@
!issue5070.pdf
!issue5238.pdf
!issue5244.pdf
!issue5421.pdf
!gradientfill.pdf
!bug903856.pdf
!bug850854.pdf

BIN
test/pdfs/issue5421.pdf

Binary file not shown.

8
test/test_manifest.json

@ -1555,6 +1555,14 @@ @@ -1555,6 +1555,14 @@
"type": "eq",
"about": "True type font with encoding dict with no base encoding but with differences."
},
{ "id": "issue5421",
"file": "pdfs/issue5421.pdf",
"md5": "273f6813758a2349090003c7c8a0d85e",
"link": false,
"rounds": 1,
"type": "eq",
"about": "Invisible Type3 font used for text selection and searching."
},
{ "id": "issue5280",
"file": "pdfs/issue5280.pdf",
"md5": "0ea1230e2964e74cb6db063a89b78803",

Loading…
Cancel
Save