Skip to content

Commit

Permalink
fix: don't use Math.floor in DomRenderer charWidth computation
Browse files Browse the repository at this point in the history
Fixes #2063
  • Loading branch information
starpit committed May 11, 2019
1 parent 724baf2 commit 23bdb2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/dom/DomRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,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 23bdb2a

Please sign in to comment.