diff --git a/src/display/canvas.js b/src/display/canvas.js index aa4971227..3f1fa7643 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -1227,7 +1227,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { // the current transformation matrix before the fillText/strokeText. // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227 var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE; - this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 : + this.current.fontSizeScale = browserFontSize !== MIN_FONT_SIZE ? 1.0 : size / MIN_FONT_SIZE; var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface; @@ -1373,7 +1373,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { lineWidth /= scale; } - if (fontSizeScale != 1.0) { + if (fontSizeScale !== 1.0) { ctx.scale(fontSizeScale, fontSizeScale); lineWidth /= fontSizeScale; }