From 4f0080dfbcd3700a9e0c90bfa33a6f7c14b2f762 Mon Sep 17 00:00:00 2001 From: funman300 Date: Tue, 12 May 2026 18:58:07 -0700 Subject: [PATCH] fix(android): replace broken HUD glyphs and restore FiraMono font MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‖ (U+2016) and ▾ (U+25BE) are absent from FiraMono and rendered as boxes on device. Replace with || (ASCII) and ↓ (U+2193, Arrows block) which are confirmed FiraMono-safe alongside the existing ≡ ← →. Also removes the erroneous Android-only TextFont split introduced in 22303c6: that split accidentally used Bevy's built-in ASCII-only bitmap font instead of FiraMono on Android, causing ALL non-ASCII HUD glyphs to render as boxes. Now both platforms use the same FiraMono handle. Separately, suppress the "Tab = next field" hint in the sync login modal on Android (no Tab key on mobile). Co-Authored-By: Claude Sonnet 4.6 --- solitaire_engine/src/hud_plugin.rs | 16 ++++++---------- solitaire_engine/src/sync_setup_plugin.rs | 3 ++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/solitaire_engine/src/hud_plugin.rs b/solitaire_engine/src/hud_plugin.rs index 771ef07..cf81912 100644 --- a/solitaire_engine/src/hud_plugin.rs +++ b/solitaire_engine/src/hud_plugin.rs @@ -626,16 +626,11 @@ fn spawn_action_buttons( mut commands: Commands, ) { let top_inset = insets.as_deref().copied().unwrap_or_default().top; - #[cfg(not(target_os = "android"))] let font = TextFont { font: font_res.as_ref().map(|f| f.0.clone()).unwrap_or_default(), font_size: TYPE_BODY, ..default() }; - // Android labels use only FiraMono-safe glyphs (≡ ← ‖ → ▾), so the same - // embedded font works — no system font fallback required. - #[cfg(target_os = "android")] - let font = TextFont { font_size: TYPE_BODY, ..default() }; // On Android, 7 text-labelled buttons at 48 dp each wrap to two rows on // a 411 dp phone. Use compact Unicode symbols and tighter gaps so all 7 @@ -650,12 +645,13 @@ fn spawn_action_buttons( #[cfg(target_os = "android")] let labels = ( - /* menu */ "\u{2261}", // ≡ identical-to (hamburger look-alike, in FiraMono) - /* undo */ "\u{2190}", // ← leftwards arrow (in FiraMono) - /* pause */ "\u{2016}", // ‖ double vertical line (in FiraMono general-punct) + /* menu */ "\u{2261}", // ≡ identical-to (Arrows/Math-Op, confirmed FiraMono) + /* undo */ "\u{2190}", // ← leftwards arrow (Arrows block, confirmed FiraMono) + /* pause */ "||", // || ASCII double-pipe — ‖ (U+2016) absent from FiraMono /* help */ "?", - /* hint */ "\u{2192}", // → rightwards arrow (in FiraMono) - /* modes */ "\u{25BE}", // ▾ small down-pointing triangle (in FiraMono) + /* hint */ "\u{2192}", // → rightwards arrow (Arrows block, confirmed FiraMono) + /* modes */ "\u{2193}", // ↓ downwards arrow (Arrows block, confirmed FiraMono) + // replaces ▾ (U+25BE) which is absent from FiraMono /* new */ "+", ); #[cfg(not(target_os = "android"))] diff --git a/solitaire_engine/src/sync_setup_plugin.rs b/solitaire_engine/src/sync_setup_plugin.rs index ca65471..3a26562 100644 --- a/solitaire_engine/src/sync_setup_plugin.rs +++ b/solitaire_engine/src/sync_setup_plugin.rs @@ -673,7 +673,8 @@ fn spawn_sync_setup_modal(commands: &mut Commands, font_res: Option<&FontResourc )); }); - // Tab hint. + // Tab hint — desktop only; no Tab key on Android. + #[cfg(not(target_os = "android"))] body.spawn(( Text::new("Tab = next field"), make_font(font_res, TYPE_CAPTION),