Use real Zed fonts in visual tests (#46394)

Richard Feldman created

This PR fixes visual tests to use the actual Zed fonts (IBM Plex Sans /
Lilex) instead of Courier.

Release Notes:

- N/A

Change summary

crates/zed/Cargo.toml                |  2 ++
crates/zed/src/visual_test_runner.rs | 11 +++++++----
2 files changed, 9 insertions(+), 4 deletions(-)

Detailed changes

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]]

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);