Improve importing font-family settings from VS Code (#39736)

Closes https://github.com/zed-industries/zed/issues/39259

- Fixes import of `editor.fontFamily` (we were looking for the wrong
key)
- Adds basic support for the CSS font-family syntax used by VS Code,
including font fallback

Release Notes:

- N/A
This commit is contained in:
John Tur
2025-10-08 19:19:48 -04:00
committed by GitHub
parent 3d0312f4c7
commit ef839cc207
5 changed files with 110 additions and 8 deletions
+5 -3
View File
@@ -123,9 +123,11 @@ impl settings::Settings for TerminalSettings {
let name = |s| format!("terminal.integrated.{s}");
vscode.f32_setting(&name("fontSize"), &mut current.font_size);
if let Some(font_family) = vscode.read_string(&name("fontFamily")) {
current.font_family = Some(FontFamilyName(font_family.into()));
}
vscode.font_family_setting(
&name("fontFamily"),
&mut current.font_family,
&mut current.font_fallbacks,
);
vscode.bool_setting(&name("copyOnSelection"), &mut current.copy_on_select);
vscode.bool_setting("macOptionIsMeta", &mut current.option_as_meta);
vscode.usize_setting("scrollback", &mut current.max_scroll_history_lines);