From 681685fa3ba8ca5d4beae70995604fd28546e743 Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Sun, 12 Nov 2017 12:43:49 +0100 Subject: [PATCH] Stop using weird transforms for double-width --- js/term/screen_renderer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/term/screen_renderer.js b/js/term/screen_renderer.js index 7fe476f..a5482a5 100644 --- a/js/term/screen_renderer.js +++ b/js/term/screen_renderer.js @@ -290,7 +290,7 @@ module.exports = class CanvasRenderer extends EventEmitter { if (dblWidth) cellWidth *= 2 ctx.save() - ctx.translate(screenX + 0.5 * cellWidth, screenY + 0.5 * cellHeight) + ctx.translate(padding, screenY + 0.5 * cellHeight) if (dblWidth) ctx.scale(2, 1) if (dblHeightTop) { // top half @@ -301,7 +301,8 @@ module.exports = class CanvasRenderer extends EventEmitter { ctx.scale(1, 2) ctx.translate(0, -cellHeight / 4) } - ctx.translate((-screenX - (dblWidth ? 1.5 : 0.5) * cellWidth) / (dblWidth ? 2 : 1), -screenY - 0.5 * cellHeight) + ctx.translate(-padding, -screenY - 0.5 * cellHeight) + if (dblWidth) ctx.translate(-cellWidth / 4, 0) if (dblHeightBot || dblHeightTop) { // characters overflow -- needs clipping