提交 31a5bbd1 编写于 作者: D Daniel Imms

Add terminal.integrated.fontLigatures setting

Fixes #7541
上级 8ce9b8a4
......@@ -3,6 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-workbench .panel.integrated-terminal {
font-feature-settings: "liga" 0;
}
.monaco-workbench .panel.integrated-terminal.enable-ligatures {
font-feature-settings: "liga" 1;
}
.monaco-workbench .panel.integrated-terminal .xterm {
background-color: transparent!important;
position: relative;
......
......@@ -59,6 +59,11 @@ configurationRegistry.registerConfiguration({
'description': nls.localize('terminal.integrated.fontFamily', "Controls the font family of the terminal, this defaults to editor.fontFamily's value."),
'type': 'string'
},
'terminal.integrated.fontLigatures': {
'description': nls.localize('terminal.integrated.fontLigatures', "Controls whether font ligatures are enabled in the terminal."),
'type': 'boolean',
'default': false
},
'terminal.integrated.fontSize': {
'description': nls.localize('terminal.integrated.fontSize', "Controls the font size of the terminal, this defaults to editor.fontSize's value."),
'type': 'number',
......
......@@ -35,6 +35,7 @@ export interface ITerminalConfiguration {
osx: string[]
},
fontFamily: string,
fontLigatures: boolean,
fontSize: number,
lineHeight: number
}
......
......@@ -137,6 +137,10 @@ export class TerminalConfigHelper {
return this.measureFont(fontFamily, fontSize + 'px', lineHeight === 0 ? 'normal' : lineHeight + 'px');
}
public getFontLigaturesEnabled(): boolean {
return this.configurationService.getConfiguration<ITerminalConfiguration>().terminal.integrated.fontLigatures;
}
public getCursorBlink(): boolean {
let editorConfig = this.configurationService.getConfiguration<IConfiguration>();
return editorConfig.editor.cursorBlinking === 'blink';
......
......@@ -201,6 +201,7 @@ export class TerminalPanel extends Panel {
return;
}
this.terminalInstances[this.terminalService.getActiveTerminalIndex()].setFont(this.configurationHelper.getFont());
DOM.toggleClass(this.parentDomElement, 'enable-ligatures', this.configurationHelper.getFontLigaturesEnabled());
this.layout(new Dimension(this.parentDomElement.offsetWidth, this.parentDomElement.offsetHeight));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册