Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2

This commit is contained in:
ADS Merger
2020-04-23 02:50:35 +00:00
committed by Anthony Dresser
parent 3603f55d97
commit 7f1d8fc32f
659 changed files with 22709 additions and 12497 deletions

View File

@@ -135,9 +135,10 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper {
if (this.config.rendererType === 'dom') {
this._lastFontMeasurement.charWidth = rect.width;
} else {
const scaledCharWidth = rect.width * window.devicePixelRatio;
const scaledCharWidth = Math.floor(rect.width * window.devicePixelRatio);
const scaledCellWidth = scaledCharWidth + Math.round(letterSpacing);
this._lastFontMeasurement.charWidth = Math.round(scaledCellWidth / window.devicePixelRatio);
const actualCellWidth = scaledCellWidth / window.devicePixelRatio;
this._lastFontMeasurement.charWidth = actualCellWidth - Math.round(letterSpacing) / window.devicePixelRatio;
}
}
@@ -188,7 +189,7 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper {
letterSpacing,
lineHeight,
charHeight: xtermCore._renderService.dimensions.actualCellHeight / lineHeight,
charWidth: xtermCore._renderService.dimensions.actualCellWidth
charWidth: xtermCore._renderService.dimensions.actualCellWidth - Math.round(letterSpacing) / window.devicePixelRatio
};
}
}