Summary
Resolve or eliminate direct cwd-relative font loads in the scoreboard family.
Context
The supported systemd deployment sets WorkingDirectory=/home/devpi/LEDMatrix, so existing direct paths such as assets/fonts/4x6-font.ttf resolve today. Do not apply a one-line or one-plugin path rewrite.
ChuckBuilds/LEDMatrix#425 makes the core FontManager resolve assets/fonts against the install root. After that change merges, family-based font resolution is covered. The remaining scope is direct ImageFont.truetype("assets/fonts/...") calls in the scoreboard family.
The planned shared-sports-code unification in docs/plugin-development/08-shared-sports-code.md intends to retire these direct call sites by routing through core helpers. Prefer that resolution when it is available.
Scope
- Audit direct cwd-relative
ImageFont.truetype("assets/fonts/...") calls in scoreboard sports.py modules.
- Audit equivalent direct calls in scoreboard
game_renderer.py sibling modules.
- Resolve the direct paths through an install-root-aware/core helper, or remove them through the planned shared-sports-code unification.
- Keep current font fallback behavior.
- Do not make an isolated migration that leaves related scoreboard font-loading paths inconsistent.
Current estimate: approximately seven direct loads per sports.py across nine scoreboard plugins, plus game_renderer.py siblings.
Acceptance criteria
- No retained scoreboard direct font load depends on the process working directory.
- The implementation uses the core font-resolution approach when practical, or removes the direct load during shared-code convergence.
- Existing font aliases, configured fonts, and fallback fonts retain their current behavior.
- The affected scoreboard plugins pass the relevant safety harness validation across supported panel sizes.
References
Summary
Resolve or eliminate direct cwd-relative font loads in the scoreboard family.
Context
The supported systemd deployment sets
WorkingDirectory=/home/devpi/LEDMatrix, so existing direct paths such asassets/fonts/4x6-font.ttfresolve today. Do not apply a one-line or one-plugin path rewrite.ChuckBuilds/LEDMatrix#425 makes the core
FontManagerresolveassets/fontsagainst the install root. After that change merges, family-based font resolution is covered. The remaining scope is directImageFont.truetype("assets/fonts/...")calls in the scoreboard family.The planned shared-sports-code unification in
docs/plugin-development/08-shared-sports-code.mdintends to retire these direct call sites by routing through core helpers. Prefer that resolution when it is available.Scope
ImageFont.truetype("assets/fonts/...")calls in scoreboardsports.pymodules.game_renderer.pysibling modules.Current estimate: approximately seven direct loads per
sports.pyacross nine scoreboard plugins, plusgame_renderer.pysiblings.Acceptance criteria
References
docs/plugin-development/08-shared-sports-code.md