mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 09:10:30 -04:00
Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2
This commit is contained in:
committed by
Anthony Dresser
parent
3603f55d97
commit
7f1d8fc32f
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user