Skip to content

Commit

Permalink
Merge pull request #2140 from Tyriar/2136_fix_dom_renderer
Browse files Browse the repository at this point in the history
Fix DOM renderer
  • Loading branch information
Tyriar authored May 28, 2019
2 parents adac12e + 0c3f2d7 commit 9ebe094
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/dom/DomRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class DomRenderer extends Disposable implements IRenderer {
actualCellHeight: null
};
this._updateDimensions();
this._injectCss();

this._rowFactory = new DomRendererRowFactory(_terminal.options, document);

Expand All @@ -90,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);
Expand Down

0 comments on commit 9ebe094

Please sign in to comment.