Skip to content

Commit 8b9f7ad

Browse files
committed
Bump version number and have the editor option reflect the effective value
1 parent 22b8922 commit 8b9f7ad

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/vs/editor/common/config/editorOptions.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,9 +1651,9 @@ export class EditorFontFamily extends BaseEditorOption<EditorOption.fontFamily,
16511651
*/
16521652
export class EditorFontVariations extends BaseEditorOption<EditorOption.fontVariations, boolean | string, string> {
16531653
// Text is laid out using default settings.
1654-
public static OFF = '"normal"';
1654+
public static OFF = 'normal';
16551655

1656-
// Translate `fontWeight` config to `font-variation-settings` CSS property.
1656+
// Translate `fontWeight` config to the `font-variation-settings` CSS property.
16571657
public static TRANSLATE = 'translate';
16581658

16591659
constructor() {
@@ -1694,6 +1694,12 @@ export class EditorFontVariations extends BaseEditorOption<EditorOption.fontVari
16941694
}
16951695
return EditorFontVariations.OFF;
16961696
}
1697+
1698+
public override compute(env: IEnvironmentalOptions, options: IComputedEditorOptions, value: string): string {
1699+
// The value is computed from the fontWeight if it is true.
1700+
// So take the result from env.fontInfo
1701+
return env.fontInfo.fontVariationSettings;
1702+
}
16971703
}
16981704

16991705
//#endregion

src/vs/editor/common/config/fontInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class BareFontInfo {
164164
}
165165

166166
// change this whenever `FontInfo` members are changed
167-
export const SERIALIZED_FONT_INFO_VERSION = 1;
167+
export const SERIALIZED_FONT_INFO_VERSION = 2;
168168

169169
export class FontInfo extends BareFontInfo {
170170
readonly _editorStylingBrand: void = undefined;

0 commit comments

Comments
 (0)