From a39da0f0d59a15710128cc9a836a53a825830914 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 28 May 2019 09:49:03 -0700 Subject: [PATCH 1/2] Ensure DOM renderer has styles injected on ctor Fixes #2136 --- src/renderer/dom/DomRenderer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/dom/DomRenderer.ts b/src/renderer/dom/DomRenderer.ts index 81cc023036..053c0dcc86 100644 --- a/src/renderer/dom/DomRenderer.ts +++ b/src/renderer/dom/DomRenderer.ts @@ -69,6 +69,7 @@ export class DomRenderer extends Disposable implements IRenderer { actualCellHeight: null }; this._updateDimensions(); + this._injectCss(); this._rowFactory = new DomRendererRowFactory(_terminal.options, document); From 0c3f2d72226cde8161eb8600682a5cbb0f114b07 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 28 May 2019 09:49:14 -0700 Subject: [PATCH 2/2] Revert "Revert "fix: don't use Math.floor in DomRenderer charWidth computation"" This reverts commit 1feb0a27e9415d176e0076d2ed8fdbe3580cb200. --- src/renderer/dom/DomRenderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/dom/DomRenderer.ts b/src/renderer/dom/DomRenderer.ts index 053c0dcc86..16f0254916 100644 --- a/src/renderer/dom/DomRenderer.ts +++ b/src/renderer/dom/DomRenderer.ts @@ -91,7 +91,7 @@ export class DomRenderer extends Disposable implements IRenderer { } private _updateDimensions(): void { - this.dimensions.scaledCharWidth = Math.floor(this._terminal.charMeasure.width * window.devicePixelRatio); + this.dimensions.scaledCharWidth = this._terminal.charMeasure.width * window.devicePixelRatio; this.dimensions.scaledCharHeight = Math.ceil(this._terminal.charMeasure.height * window.devicePixelRatio); this.dimensions.scaledCellWidth = this.dimensions.scaledCharWidth + Math.round(this._terminal.options.letterSpacing); this.dimensions.scaledCellHeight = Math.floor(this.dimensions.scaledCharHeight * this._terminal.options.lineHeight);