From a0ac0de765b1f542196256a2ec762004579f2ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 9 May 2026 22:45:17 -0400 Subject: [PATCH] Override gpui-component theme font so the Input picks up Geist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found the actual root cause of "fonts still wrong" by reading gpui-component source. Input, tooltip, context menu, search popover, notification, and inspector all set `font_family(cx.theme().font_family)` on their root div directly — they don't inherit from the parent's text style. Default theme value is `.SystemUIFont` (SF Pro on macOS), so the omnibar Input the user actually types into was rendering in SF Pro while every chrome surface around it rendered Geist. After fonts register, mutate the theme global so its `font_family` is `"Geist"`. Now every gpui-component sub-element uses the same sans as the rest of the app. cargo test --workspace: 440 passed, 0 failed. --- crates/ely_app/src/main.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/ely_app/src/main.rs b/crates/ely_app/src/main.rs index e7bb9e3..58727f7 100644 --- a/crates/ely_app/src/main.rs +++ b/crates/ely_app/src/main.rs @@ -63,6 +63,17 @@ fn main() { if let Err(error) = shell::chrome::register_serif_fonts(cx) { eprintln!("ELY: failed to register serif fonts: {error}"); } + // gpui-component's Input, tooltip, context menu, search popover, + // notification surface, etc. all read their font from + // `cx.theme().font_family` directly instead of inheriting from + // the parent. Default theme value is `.SystemUIFont` (SF Pro on + // macOS), so without this override the user types into the + // omnibar in SF Pro while every other surface renders Geist — + // exactly the "fonts still wrong" the screenshot showed. + // Override the theme so every gpui-component sub-element uses + // Geist too. + gpui_component::Theme::global_mut(cx).font_family = + shell::chrome::SANS_FAMILY.into(); cx.on_action(quit); bind_shortcuts(cx); cx.on_action(open_private_window);