From e8e805d8278726c300ff4624784fd4e9a491aac1 Mon Sep 17 00:00:00 2001 From: "Sergei G." Date: Fri, 12 Jun 2026 10:43:12 +0400 Subject: [PATCH] gpui_macos: Warn when falling back to NoopTextSystem Without the "font-kit" feature, MacPlatform silently substitutes gpui::NoopTextSystem, which accepts fonts and resolves font ids but rasterizes every glyph to an empty bitmap. The misconfiguration only surfaces as invisibly blank text in windowed apps, which is expensive to trace back to a missing cargo feature, so log a warning at startup. Skip the warning in headless mode, where no text is expected to render and the fallback is a reasonable configuration. --- crates/gpui_macos/src/platform.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/gpui_macos/src/platform.rs b/crates/gpui_macos/src/platform.rs index 87346991d64750..aedb2d38274aac 100644 --- a/crates/gpui_macos/src/platform.rs +++ b/crates/gpui_macos/src/platform.rs @@ -194,7 +194,14 @@ impl MacPlatform { let text_system = Arc::new(crate::MacTextSystem::new()); #[cfg(not(feature = "font-kit"))] - let text_system = Arc::new(gpui::NoopTextSystem::new()); + let text_system = { + if !headless { + log::warn!( + "gpui_macos was compiled without the `font-kit` feature, so no text will be rendered." + ); + } + Arc::new(gpui::NoopTextSystem::new()) + }; let keyboard_layout = MacKeyboardLayout::new(); let keyboard_mapper = Rc::new(MacKeyboardMapper::new(keyboard_layout.id()));