From aeed52d6ddd24d81aad6c3e18f6365fe686b5c63 Mon Sep 17 00:00:00 2001 From: funman300 Date: Sun, 19 Apr 2026 10:45:42 -0700 Subject: [PATCH] setup: load Bootstrap Icons font so icons render in the wizard Both run() and run_new() were starting with Task::none(), so the Bootstrap font was never loaded. All icon() calls in the setup wizard rendered as '?' glyphs. Load the font as the initial task (batched with AutoDownload where needed) and handle FontLoaded as a no-op. Co-Authored-By: Claude Sonnet 4.6 --- src/setup.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/setup.rs b/src/setup.rs index 5191dae..f792b33 100644 --- a/src/setup.rs +++ b/src/setup.rs @@ -41,6 +41,7 @@ pub enum Message { LaunchNow, Close, ToggleLog, + FontLoaded, } #[derive(Debug, Clone)] @@ -392,6 +393,7 @@ fn update(state: &mut State, message: Message) -> Task { iced::exit() } Message::Close => iced::exit(), + Message::FontLoaded => Task::none(), } } @@ -871,10 +873,12 @@ pub fn run(config: &Config, launcher: &Launcher) -> Result<()> { if has_url { state.source = launcher.installer_url.unwrap_or_default(); } + let load_font = iced::font::load(std::borrow::Cow::Borrowed(iced_fonts::BOOTSTRAP_FONT_BYTES)) + .map(|_| Message::FontLoaded); let init_task = if has_url { - Task::done(Message::AutoDownload) + Task::batch([load_font, Task::done(Message::AutoDownload)]) } else { - Task::none() + load_font }; (state, init_task) }) @@ -891,7 +895,11 @@ pub fn run_new(config: &Config) -> Result<()> { resizable: false, ..Default::default() }) - .run_with(move || (State::new_picking(config.clone()), Task::none())) + .run_with(move || { + let load_font = iced::font::load(std::borrow::Cow::Borrowed(iced_fonts::BOOTSTRAP_FONT_BYTES)) + .map(|_| Message::FontLoaded); + (State::new_picking(config.clone()), load_font) + }) .map_err(|e| anyhow::anyhow!("iced: {e}")) }