|
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | 6 | import * as nls from 'vs/nls'; |
7 | | -import { EditorOptions, EDITOR_FONT_DEFAULTS, IEditorOptions } from 'vs/editor/common/config/editorOptions'; |
| 7 | +import { EDITOR_FONT_DEFAULTS, IEditorOptions } from 'vs/editor/common/config/editorOptions'; |
8 | 8 | import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; |
9 | 9 | import { ITerminalConfiguration, TERMINAL_CONFIG_SECTION, DEFAULT_LETTER_SPACING, DEFAULT_LINE_HEIGHT, MINIMUM_LETTER_SPACING, MINIMUM_FONT_WEIGHT, MAXIMUM_FONT_WEIGHT, DEFAULT_FONT_WEIGHT, DEFAULT_BOLD_FONT_WEIGHT, FontWeight, ITerminalFont } from 'vs/workbench/contrib/terminal/common/terminal'; |
10 | 10 | import Severity from 'vs/base/common/severity'; |
@@ -71,7 +71,7 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper { |
71 | 71 |
|
72 | 72 | configFontIsMonospace(): boolean { |
73 | 73 | const fontSize = 15; |
74 | | - const fontFamily = this.config.fontFamily || EditorOptions.fontFamily.validate(this._configurationService.getValue<IEditorOptions>('editor').fontFamily); |
| 74 | + const fontFamily = this.config.fontFamily || this._configurationService.getValue<IEditorOptions>('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily; |
75 | 75 | const iRect = this._getBoundingRectFor('i', fontFamily, fontSize); |
76 | 76 | const wRect = this._getBoundingRectFor('w', fontFamily, fontSize); |
77 | 77 |
|
@@ -155,7 +155,7 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper { |
155 | 155 | getFont(xtermCore?: IXtermCore, excludeDimensions?: boolean): ITerminalFont { |
156 | 156 | const editorConfig = this._configurationService.getValue<IEditorOptions>('editor'); |
157 | 157 |
|
158 | | - let fontFamily = this.config.fontFamily || EditorOptions.fontFamily.validate(editorConfig.fontFamily); |
| 158 | + let fontFamily = this.config.fontFamily || editorConfig.fontFamily || EDITOR_FONT_DEFAULTS.fontFamily; |
159 | 159 | let fontSize = this._clampInt(this.config.fontSize, MINIMUM_FONT_SIZE, MAXIMUM_FONT_SIZE, EDITOR_FONT_DEFAULTS.fontSize); |
160 | 160 |
|
161 | 161 | // Work around bad font on Fedora/Ubuntu |
|
0 commit comments