From 37146e6e60150c7be19867c0d441c21828bf00af Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Thu, 8 Jan 2026 16:18:22 -0500 Subject: [PATCH] Use real Zed fonts in visual tests (#46394) This PR fixes visual tests to use the actual Zed fonts (IBM Plex Sans / Lilex) instead of Courier. Release Notes: - N/A --- crates/zed/Cargo.toml | 2 ++ crates/zed/src/visual_test_runner.rs | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index a2bd81bf94a1c56bfacdd6c38cec38c4763fbbc1..86a239cbedf3fd22868a0c0b89331e72602c1dfe 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.rs index 537f40e9259984f460839465f5fcb07e0c65c189..c3789fa8a85af5f669fff0fad5dc2abaf48e3e40 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 initialization let app_state = init_app_state(cx);