From 673358e2ce64b65b28a4a94079dd83d56a51254a Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Fri, 29 Sep 2017 15:51:35 +0200 Subject: [PATCH] Fix remaining issues with scaling --- js/term/screen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/term/screen.js b/js/term/screen.js index 9e58cad..91baf3f 100644 --- a/js/term/screen.js +++ b/js/term/screen.js @@ -371,7 +371,7 @@ module.exports = class TermScreen extends EventEmitter { */ updateSize () { // see below (this is just updating it) - this._window.devicePixelRatio = Math.round(this._windowScale * (window.devicePixelRatio || 1) * 2) / 2 + this._window.devicePixelRatio = Math.ceil(this._windowScale * (window.devicePixelRatio || 1)) let didChange = false for (let key in this.windowState) { @@ -421,7 +421,7 @@ module.exports = class TermScreen extends EventEmitter { this._padding = padding * (originalWidth / realWidth) // the DPR must be rounded to a very nice value to prevent gaps between cells - let devicePixelRatio = this._window.devicePixelRatio = Math.ceil(this._windowScale * (window.devicePixelRatio || 1) * 2) / 2 + let devicePixelRatio = this._window.devicePixelRatio = Math.ceil(this._windowScale * (window.devicePixelRatio || 1)) this.canvas.width = (width * cellSize.width + 2 * Math.round(this._padding)) * devicePixelRatio this.canvas.style.width = `${realWidth}px`