Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use real Zed fonts in visual tests (#46394)
Richard Feldman37146e6e6015
diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.tomlindex a2bd81bf94a..86a239cbedf 100644--- a/crates/zed/Cargo.toml+++ b/crates/zed/Cargo.toml@@ -46,6 +46,8 @@ visual-tests = ["agent/test-support","language_model/test-support","fs/test-support",+ "recent_projects/test-support",+ "title_bar/test-support",][[bin]]diff --git a/crates/zed/src/visual_test_runner.rs b/crates/zed/src/visual_test_runner.rsindex 537f40e9259..c3789fa8a85 100644--- a/crates/zed/src/visual_test_runner.rs+++ b/crates/zed/src/visual_test_runner.rs@@ -31,7 +31,7 @@ use gpui::{};use image::RgbaImage;use project_panel::ProjectPanel;-use settings::SettingsStore;+use std::any::Any;use std::path::{Path, PathBuf};use std::rc::Rc;@@ -212,9 +212,12 @@ fn main() {Application::new().with_assets(assets::Assets).run(move |cx| {- // Initialize settings store first (required by theme and other subsystems)- let settings_store = SettingsStore::test(cx);- cx.set_global(settings_store);+ // Load embedded fonts (Zed Sans and Zed Mono)+ assets::Assets.load_fonts(cx).unwrap();++ // Initialize settings store with real default settings (not test settings)+ // Test settings use Courier font, but we want the real Zed fonts for visual tests+ settings::init(cx);// Create AppState using the production-like initializationlet app_state = init_app_state(cx);