提交 4da88e6f 编写于 作者: P Phawin Khongkhasawan

Remove fontWeight

上级 139e9c2e
......@@ -52,7 +52,6 @@ export interface ITerminalConfiguration {
fontFamily: string;
fontLigatures: boolean;
fontSize: number;
fontWeight: string;
lineHeight: number;
setLocaleVariables: boolean;
scrollback: number;
......@@ -72,7 +71,6 @@ export interface ITerminalFont {
lineHeight: number;
charWidth: number;
charHeight: number;
fontWeight: string;
}
export interface IShellLaunchConfig {
......
......@@ -106,10 +106,10 @@ configurationRegistry.registerConfiguration({
'type': 'number',
'default': 1.2
},
'terminal.integrated.fontWeight': {
'terminal.integrated.enableBold': {
'type': 'string',
'description': nls.localize('terminal.integrated.fontWeight', "Customizes font weight in terminal."),
'default': 'normal'
'default': true
},
'terminal.integrated.cursorBlinking': {
'description': nls.localize('terminal.integrated.cursorBlinking', "Controls whether the terminal cursor blinks."),
......
......@@ -83,13 +83,12 @@ export class TerminalConfigHelper implements ITerminalConfigHelper {
if (fontSize <= 0) {
fontSize = DefaultConfig.editor.fontSize;
}
let fontWeight = terminalConfig.fontWeight;
let lineHeight = terminalConfig.lineHeight <= 0 ? DEFAULT_LINE_HEIGHT : terminalConfig.lineHeight;
if (!lineHeight) {
lineHeight = DEFAULT_LINE_HEIGHT;
}
return this._measureFont(fontFamily, fontSize, lineHeight, fontWeight);
return this._measureFont(fontFamily, fontSize, lineHeight);
}
public mergeDefaultShellPathAndArgs(shell: IShellLaunchConfig): IShellLaunchConfig {
......
......@@ -235,7 +235,6 @@ export class TerminalPanel extends Panel {
`font-family: ${newFont.fontFamily};` +
`font-size: ${newFont.fontSize};` +
`line-height: ${newFont.lineHeight};` +
`font-weight: ${newFont.fontWeight};` +
'}';
this._font = newFont;
}
......
......@@ -117,27 +117,6 @@ suite('Workbench - TerminalConfigHelper', () => {
assert.equal(configHelper.getFont().fontSize, `${DefaultConfig.editor.fontSize}px`, 'The default editor font size should be used when editor.fontSize is < 0 and terminal.integrated.fontSize not set');
});
test('TerminalConfigHelper - getFont fontWeight', function () {
let configurationService: IConfigurationService;
let configHelper: TerminalConfigHelper;
configurationService = new MockConfigurationService({
editor: {
fontFamily: 'foo',
fontWeight: 'normal'
},
terminal: {
integrated: {
fontFamily: 'bar',
fontWeight: 'bold'
}
}
});
configHelper = new TerminalConfigHelper(Platform.Linux, configurationService);
configHelper.panelContainer = fixture;
assert.equal(configHelper.getFont().fontWeight, 'bold', 'terminal.integrated.fontWeight should be selected over editor.fontWeight');
});
test('TerminalConfigHelper - getFont lineHeight', function () {
let configurationService: IConfigurationService;
let configHelper: TerminalConfigHelper;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册