fix(android): replace broken HUD glyphs and restore FiraMono font

‖ (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 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-12 18:58:07 -07:00
parent 46c3bf4bb2
commit 4f0080dfbc
2 changed files with 8 additions and 11 deletions
+6 -10
View File
@@ -626,16 +626,11 @@ fn spawn_action_buttons(
mut commands: Commands, mut commands: Commands,
) { ) {
let top_inset = insets.as_deref().copied().unwrap_or_default().top; let top_inset = insets.as_deref().copied().unwrap_or_default().top;
#[cfg(not(target_os = "android"))]
let font = TextFont { let font = TextFont {
font: font_res.as_ref().map(|f| f.0.clone()).unwrap_or_default(), font: font_res.as_ref().map(|f| f.0.clone()).unwrap_or_default(),
font_size: TYPE_BODY, font_size: TYPE_BODY,
..default() ..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 // 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 // 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")] #[cfg(target_os = "android")]
let labels = ( let labels = (
/* menu */ "\u{2261}", // ≡ identical-to (hamburger look-alike, in FiraMono) /* menu */ "\u{2261}", // ≡ identical-to (Arrows/Math-Op, confirmed FiraMono)
/* undo */ "\u{2190}", // ← leftwards arrow (in FiraMono) /* undo */ "\u{2190}", // ← leftwards arrow (Arrows block, confirmed FiraMono)
/* pause */ "\u{2016}", // ‖ double vertical line (in FiraMono general-punct) /* pause */ "||", // || ASCII double-pipe — ‖ (U+2016) absent from FiraMono
/* help */ "?", /* help */ "?",
/* hint */ "\u{2192}", // → rightwards arrow (in FiraMono) /* hint */ "\u{2192}", // → rightwards arrow (Arrows block, confirmed FiraMono)
/* modes */ "\u{25BE}", // small down-pointing triangle (in FiraMono) /* modes */ "\u{2193}", // downwards arrow (Arrows block, confirmed FiraMono)
// replaces ▾ (U+25BE) which is absent from FiraMono
/* new */ "+", /* new */ "+",
); );
#[cfg(not(target_os = "android"))] #[cfg(not(target_os = "android"))]
+2 -1
View File
@@ -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(( body.spawn((
Text::new("Tab = next field"), Text::new("Tab = next field"),
make_font(font_res, TYPE_CAPTION), make_font(font_res, TYPE_CAPTION),