diff --git a/src/display/canvas.js b/src/display/canvas.js index 92cf8da0c..359ebd244 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -1770,7 +1770,7 @@ class CanvasGraphics { // parallelogram where both heights are lower than 1 and not equal. ctx.save(); ctx.resetTransform(); - ctx.lineWidth = Math.round(this._combinedScaleFactor); + ctx.lineWidth = Math.floor(this._combinedScaleFactor); ctx.stroke(); ctx.restore(); } else { @@ -2040,7 +2040,7 @@ class CanvasGraphics { ) { if (resetLineWidthToOne) { ctx.resetTransform(); - ctx.lineWidth = Math.round(this._combinedScaleFactor); + ctx.lineWidth = Math.floor(this._combinedScaleFactor); } ctx.stroke(); } @@ -2060,7 +2060,7 @@ class CanvasGraphics { ctx.save(); ctx.moveTo(x, y); ctx.resetTransform(); - ctx.lineWidth = Math.round(this._combinedScaleFactor); + ctx.lineWidth = Math.floor(this._combinedScaleFactor); ctx.strokeText(character, 0, 0); ctx.restore(); } else { diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 2627c9fc3..750cba0a3 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -471,6 +471,7 @@ !issue11442_reduced.pdf !issue11549_reduced.pdf !issue8097_reduced.pdf +!bug1743245.pdf !quadpoints.pdf !transparent.pdf !issue13931.pdf diff --git a/test/pdfs/bug1743245.pdf b/test/pdfs/bug1743245.pdf new file mode 100644 index 000000000..47910991e Binary files /dev/null and b/test/pdfs/bug1743245.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 6d397afc4..4bb034412 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -4042,6 +4042,12 @@ "type": "eq", "annotations": true }, + { "id": "bug1743245", + "file": "pdfs/bug1743245.pdf", + "md5": "01eadf118ec05fe02e91db63536d50f6", + "rounds": 1, + "type": "eq" + }, { "id": "issue1002", "file": "pdfs/issue1002.pdf", "md5": "af62d6cd95079322d4af18edd960d15c",