From: notmasteryet Date: Tue, 14 Feb 2012 02:45:51 +0000 (-0600) Subject: scale line width; set min font size to 8 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=99d71cc713bdd56566ea8640cd2bcbc8ca7cde96;p=pdf.js.git scale line width; set min font size to 8 --- diff --git a/src/canvas.js b/src/canvas.js index 0ec92d9..1a2ff39 100644 --- a/src/canvas.js +++ b/src/canvas.js @@ -18,7 +18,7 @@ var TextRenderingMode = { }; // Minimal font size that would be used during canvas fillText operations. -var MIN_FONT_SIZE = 5; +var MIN_FONT_SIZE = 8; var CanvasExtraState = (function CanvasExtraStateClosure() { function CanvasExtraState(old) { @@ -721,7 +721,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { if (scale == 0 || lineWidth == 0) lineWidth = this.getSinglePixelWidth(); else - lineWidth /= scale; + lineWidth /= scale * fontSizeScale; ctx.lineWidth = lineWidth;