From 6a9352cde1894cdf1e7e5b736fa860000a6cd84f Mon Sep 17 00:00:00 2001 From: funman300 Date: Mon, 22 Jun 2026 11:04:11 -0700 Subject: [PATCH] docs: correct font-embed claims in font_plugin and CLAUDE.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit font_plugin's module doc claimed a parse failure aborts the program, but the code warns and continues with glyph-less UI; fix the doc to match. CLAUDE.md §4.2 listed only audio and the card theme as embedded while saying "do not embed user fonts"; document that the bundled FiraMono face is legitimately embedded via include_bytes! as the canonical UI font. Co-Authored-By: Claude Opus 4.8 (1M context) --- CLAUDE.md | 9 +++++++-- solitaire_engine/src/font_plugin.rs | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 26b5b08..79323a8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -208,9 +208,14 @@ Embed via `include_bytes!()` only when ALL of the following are true: Currently embedded: * **Audio** — all `.wav` files in `audio_plugin.rs` * **Default card theme** — shipped via `embedded://` scheme in `ThemePlugin` +* **Bundled UI font** — `assets/fonts/main.ttf` (FiraMono) via `include_bytes!` + in `font_plugin.rs` and `assets/svg_loader.rs`; it is the canonical UI face + and must always be present, so it is embedded rather than `AssetServer`-loaded -Do NOT embed card face PNGs, background images, or user fonts — -these are loaded via `AssetServer` so art can be swapped without recompile. +Do NOT embed card face PNGs or background images — these are loaded via +`AssetServer` so art can be swapped without recompile. User-supplied fonts +(if ever added) likewise go through `AssetServer`; only the bundled FiraMono +face above is embedded. --- diff --git a/solitaire_engine/src/font_plugin.rs b/solitaire_engine/src/font_plugin.rs index 8098554..7c4e42d 100644 --- a/solitaire_engine/src/font_plugin.rs +++ b/solitaire_engine/src/font_plugin.rs @@ -2,8 +2,9 @@ //! //! Bundling rather than runtime-loading guarantees the canonical UI face is //! always available regardless of install or platform. The bytes are -//! validated at startup; a parse failure aborts the program with a clear -//! error because it means the binary is corrupt. +//! validated at startup; a parse failure logs a warning and continues with +//! glyph-less UI rather than aborting, since crashing on a corrupt embed is +//! worse than degraded text. use bevy::prelude::*;