From b4ddc83e859b802583fdb92f279df4a082d77661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Mon, 11 Mar 2024 17:21:37 +0100 Subject: [PATCH] Allow overriding font style and weight via experimental.theme_overrides in settings (#9122) Release Notes: - Added support for overriding the current theme's syntax font styles and weights in settings ([#9121](https://github.com/zed-industries/zed/issues/9121)). | Before | After | | ------ | ----- | | ![Screenshot 2024-03-09 at 22 20 01@2x](https://github.com/zed-industries/zed/assets/38924/c693468d-1e04-45b4-b7c0-869e2a22a44c) | ![Screenshot 2024-03-09 at 22 21 09@2x](https://github.com/zed-industries/zed/assets/38924/d8b09676-dd8b-46ac-8e9d-6cf2094a9c7e) | --- crates/theme/src/schema.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/theme/src/schema.rs b/crates/theme/src/schema.rs index 603cf035d7..e88cff85f4 100644 --- a/crates/theme/src/schema.rs +++ b/crates/theme/src/schema.rs @@ -92,6 +92,12 @@ impl ThemeStyleContent { .color .as_ref() .and_then(|color| try_parse_color(color).ok()), + font_style: style + .font_style + .map(|font_style| FontStyle::from(font_style)), + font_weight: style + .font_weight + .map(|font_weight| FontWeight::from(font_weight)), ..Default::default() }, )