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:
@@ -731,9 +731,11 @@ impl settings::Settings for ThemeSettings {
|
||||
fn import_from_vscode(vscode: &settings::VsCodeSettings, current: &mut SettingsContent) {
|
||||
vscode.from_f32_setting("editor.fontWeight", &mut current.theme.buffer_font_weight);
|
||||
vscode.from_f32_setting("editor.fontSize", &mut current.theme.buffer_font_size);
|
||||
if let Some(font) = vscode.read_string("editor.font") {
|
||||
current.theme.buffer_font_family = Some(FontFamilyName(font.into()));
|
||||
}
|
||||
vscode.font_family_setting(
|
||||
"editor.fontFamily",
|
||||
&mut current.theme.buffer_font_family,
|
||||
&mut current.theme.buffer_font_fallbacks,
|
||||
)
|
||||
// TODO: possibly map editor.fontLigatures to buffer_font_features?
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user