Skip to content

FontManager doesn't register tom_thumb even though assets/fonts/tom-thumb.bdf ships with the core #524

Description

@ChuckBuilds

Summary

assets/fonts/tom-thumb.bdf ships with the core, but FontManager's family table (src/font_manager.py:97-99) only registers three families:

"press_start": "assets/fonts/PressStart2P-Regular.ttf",
"four_by_six": "assets/fonts/4x6-font.ttf",
"five_by_seven": "assets/fonts/5x7.bdf"

Any plugin that asks for tom_thumb gets Font family 'tom_thumb' not found from the core and has to carry its own loader to use a font the core already ships.

Evidence

The countdown plugin (v3.3.0) offers all four families in its config_schema.json enum. Rendering with each:

cd ~/LEDMatrix
python3 scripts/check_plugin.py -p countdown -d ~/LEDMatrix/plugin-repos \
--golden-dir /tmp/nogolden -o /tmp/cd_tom_thumb \
-c '{"countdowns":[{"name":"Launch","target":"2027-01-01T00:00:00"}],"font_size":6,"fit_to_display":false,"font_family":"tom_thumb"}'
familyrender rcdistinct output"not found" warnings per run
press_start0yes0
four_by_six0yes0
five_by_seven0yes0
tom_thumb0yes16

All four produce visually distinct renders, so tom_thumbdoes end up applied — but only because countdown mirrors the core's table privately and loads the file itself (manager.py:291-297, _load_family_font_direct). The 16 warnings per render are the core refusing first.

The file is present:

$ ls ~/LEDMatrix/assets/fonts/ | grep tom
tom-thumb.bdf

Why it matters

  1. Log noise: 16 warning lines per render for a font that works.
  2. Any plugin without countdown's private fallback genuinely cannot use a bundled font.
  3. countdown is carrying a duplicated copy of a core table specifically to work around this — the comment there ("Mirror of the core FontManager's family -> file table") reads as a known workaround.

Suggested fix

Add the entry to the core table:

"tom_thumb": "assets/fonts/tom-thumb.bdf",

Worth checking the other bundled .bdf files in assets/fonts/ at the same time — 4x6.bdf, 5x8.bdf, 6x10.bdf, MatrixChunky8.bdf, cozette.bdf and friends are all shipped but unnamed, while calendar's schema for instance exposes 5x7.bdf, 4x6.bdf and cozette.bdf by filename rather than family.

Environment

LEDMatrix v3.3.0-4-g0730d952, 256x64 rig, countdown 3.3.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions