fix(android): replace non-FiraMono HUD glyphs with safe Unicode alternatives
⏸ (U+23F8), ★ (U+2605), ⚙ (U+2699) are absent from FiraMono and rendered as boxes on device. Replace with ← ‖ → ▾ which all fall within FiraMono's covered blocks (Basic Latin + Arrows + General Punctuation + Geometric Shapes). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -626,11 +626,16 @@ 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
|
||||||
@@ -645,12 +650,12 @@ fn spawn_action_buttons(
|
|||||||
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
let labels = (
|
let labels = (
|
||||||
/* menu */ "\u{2261}", // ≡ hamburger
|
/* menu */ "\u{2261}", // ≡ identical-to (hamburger look-alike, in FiraMono)
|
||||||
/* undo */ "\u{21A9}", // ↩ undo arrow
|
/* undo */ "\u{2190}", // ← leftwards arrow (in FiraMono)
|
||||||
/* pause */ "\u{23F8}", // ⏸ pause symbol
|
/* pause */ "\u{2016}", // ‖ double vertical line (in FiraMono general-punct)
|
||||||
/* help */ "?",
|
/* help */ "?",
|
||||||
/* hint */ "\u{2605}", // ★ star
|
/* hint */ "\u{2192}", // → rightwards arrow (in FiraMono)
|
||||||
/* modes */ "\u{2699}\u{25BE}", // ⚙▾ gear+chevron
|
/* modes */ "\u{25BE}", // ▾ small down-pointing triangle (in FiraMono)
|
||||||
/* new */ "+",
|
/* new */ "+",
|
||||||
);
|
);
|
||||||
#[cfg(not(target_os = "android"))]
|
#[cfg(not(target_os = "android"))]
|
||||||
|
|||||||
Reference in New Issue
Block a user