From bd493645530db0aa7598114f9aee64b0f099bc25 Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 27 May 2026 19:03:11 -0700 Subject: [PATCH] fix(android): replace forbidden Unicode chars in win_summary and splash (#52, #53) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- solitaire_engine/src/splash_plugin.rs | 22 +++++++++++----------- solitaire_engine/src/win_summary_plugin.rs | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/solitaire_engine/src/splash_plugin.rs b/solitaire_engine/src/splash_plugin.rs index 7896a6e..3d40211 100644 --- a/solitaire_engine/src/splash_plugin.rs +++ b/solitaire_engine/src/splash_plugin.rs @@ -45,7 +45,7 @@ //! progress-bar caption, palette label, eight palette swatches, //! version line). //! -//! The trailing "▌ ready_" cursor pulse layers on top of the fade +//! The trailing "| ready_" cursor pulse layers on top of the fade //! by carrying both [`SplashFadableBg`] and [`SplashCursorPulse`]: //! [`pulse_splash_cursor`] runs after [`advance_splash`] in the //! schedule chain and overwrites the cursor's `BackgroundColor` @@ -109,7 +109,7 @@ impl Plugin for SplashPlugin { } } -/// Period of the trailing "▌ ready_" pulse cursor, in seconds. ~1 s +/// Period of the trailing "| ready_" pulse cursor, in seconds. ~1 s /// reads as a comfortable terminal-blink cadence — much faster reads /// as urgent (alarming on a hold-and-fade screen), much slower reads /// as listless. Held as a `const` rather than a token because it's @@ -157,7 +157,7 @@ struct SplashFadableBg { base_color: Color, } -/// Marks the trailing pulse cursor on the "▌ ready_" line. Carries +/// Marks the trailing pulse cursor on the "| ready_" line. Carries /// `SplashFadableBg` too so it picks up the global fade-in / hold / /// fade-out timeline; [`pulse_splash_cursor`] runs *after* /// [`advance_splash`] in the chain and overwrites the @@ -377,7 +377,7 @@ fn spawn_header_section(parent: &mut ChildSpawnerCommands, font_handle: &Handle< .with_children(|hdr| { hdr.spawn(( SplashFadable { base_color: ACCENT_PRIMARY }, - Text::new("\u{258C}"), // ▌ — the Terminal cursor block. + Text::new("|"), // ASCII terminal cursor. cursor_font, TextColor(transparent(ACCENT_PRIMARY)), )); @@ -431,7 +431,7 @@ fn spawn_centre_section(parent: &mut ChildSpawnerCommands, font_handle: &Handle< }); } -/// Boot-log column: three lime check rows + a "▌ ready_" line. Content +/// Boot-log column: three lime check rows + a "| ready_" line. Content /// is fixture text, not driven from real bootstrap state — the splash /// is a brand beat, not a real loader. Capped at 480 px width on /// desktop (the design-system spec calls 70 % of mobile viewport, @@ -483,8 +483,8 @@ fn spawn_check_row(parent: &mut ChildSpawnerCommands, line_font: &TextFont, labe }); } -/// "▌ ready_" line — visual signature of "boot complete, awaiting -/// input". The leading `▌` glyph picks up `TEXT_PRIMARY` rather than +/// "| ready_" line — visual signature of "boot complete, awaiting +/// input". The leading `|` glyph picks up `TEXT_PRIMARY` rather than /// `ACCENT_PRIMARY` so it doesn't compete with the big accent cursor in /// the header; the *trailing* 6×12 px accent pulse Node ([`SplashCursorPulse`]) /// is what carries the "alive, blinking" signal called for by the @@ -503,12 +503,12 @@ fn spawn_ready_row(parent: &mut ChildSpawnerCommands, line_font: &TextFont) { .with_children(|row| { row.spawn(( SplashFadable { base_color: TEXT_PRIMARY }, - Text::new("\u{258C} ready_"), // ▌ ready_ + Text::new("| ready_"), // ASCII ready prompt. line_font.clone(), TextColor(transparent(TEXT_PRIMARY)), )); // Trailing 6×12 accent pulse cursor. Node-with-explicit- - // dimensions rather than a `█` text glyph so the size + // dimensions rather than a solid-block text glyph so the size // doesn't drift with the line font; matches the mockup's // 6×12 px spec literally. Pulse animation lives in // `pulse_splash_cursor` for testability. @@ -1166,8 +1166,8 @@ mod tests { .map(|t| t.0.clone()) .collect(); assert!( - texts.iter().any(|t| t == "\u{258C}"), - "expected the cursor block (▌) on the splash, got: {texts:?}" + texts.iter().any(|t| t == "|"), + "expected the ASCII cursor (|) on the splash, got: {texts:?}" ); assert!( texts.iter().any(|t| t == "Ferrous Solitaire"), diff --git a/solitaire_engine/src/win_summary_plugin.rs b/solitaire_engine/src/win_summary_plugin.rs index 7ec2336..122332c 100644 --- a/solitaire_engine/src/win_summary_plugin.rs +++ b/solitaire_engine/src/win_summary_plugin.rs @@ -282,7 +282,7 @@ pub const SCORE_NO_UNDO_BONUS: i32 = 25; /// Time bonus ({m:ss}) +{time_bonus} /// No-undo bonus +{no_undo_bonus} /// Mode multiplier ({mode} ×N) ×{multiplier} -/// ───────────────────────────────── +/// ----------------- /// Total {total} /// ``` /// @@ -1019,11 +1019,11 @@ fn spawn_score_breakdown( row_index += 1; } - // 5. Separator — em-dashes spanning the visual width. + // 5. Separator — ASCII dashes spanning the visual width. spawn_breakdown_row( card, - "─────────────────", - "─────".to_string(), + "-----------------", + "-----".to_string(), TEXT_SECONDARY, anim_speed, stagger * row_index as f32,