diff --git a/crates/eframe/src/native/epi_integration.rs b/crates/eframe/src/native/epi_integration.rs index a170d384..325674de 100644 --- a/crates/eframe/src/native/epi_integration.rs +++ b/crates/eframe/src/native/epi_integration.rs @@ -147,6 +147,35 @@ pub fn create_storage_with_file(_file: impl Into) -> Option) -> Option { + use core::sync::atomic::Ordering::Relaxed; + if !self.warned.swap(true, Relaxed) { + log::info!( + "No font has {:?}. \ + Enable the `system_fonts` feature in `eframe`, \ + add a font with `egui::Context::add_font`, \ + or set `NativeOptions::system_font_fallback` to `false` to silence this.", + request.cluster + ); + } + None + } +} + +// ---------------------------------------------------------------------------- + /// Everything needed to make a winit-based integration for [`epi`]. /// /// Only one instance per app (not one per viewport). @@ -217,9 +246,11 @@ impl EpiIntegration { Some(icon), ); - #[cfg(feature = "system_fonts")] if native_options.system_font_fallback { - egui_ctx.add_font_provider(Arc::new(egui_system_fonts::SystemFontProvider::new())); + egui_ctx.add_font_provider(cfg_select! { + feature = "system_fonts" => Arc::new(egui_system_fonts::SystemFontProvider::new()), + _ => Arc::new(MissingSystemFontsWarning::default()), + }); } Self {