Skip to content

cozette.bdf is offered by twelve plugins and does not exist in the core #387

Description

@ChuckBuilds

What

Twelve plugin schemas offer cozette.bdf in their font enum:

afl-scoreboard        jellyfin-now-playing   news
basketball-scoreboard ledmatrix-music        nrl-scoreboard
calendar              ledmatrix-stocks       odds-ticker
football-scoreboard   mqtt-notifications     soccer-scoreboard

assets/fonts/ in the LEDMatrix core contains no cozette.bdf, and there is no file of that name anywhere in the core checkout. Selecting it can never work: the file is not found, and every one of these plugins falls through to ImageFont.load_default() — a font much smaller than any of the offered sizes — with at most a warning in the log.

So the web UI presents a choice that silently degrades the display for anyone who picks it.

Related: the .bdf sizes in the same enums are mostly unusable too

.bdf files are bitmap fonts that exist at exactly one pixel size. ImageFont.truetype(path, size) raises OSError: invalid pixel size for any other, and these plugins catch it and fall back to the default font. Measured against the sizes the schemas actually offer (4–16):

5x7.bdf                    loads only at 7    fails at 12 of 13 offered sizes
4x6.bdf                    loads only at 6    fails at 12 of 13 offered sizes
cozette.bdf                loads at nothing   fails at 13 of 13
5by7.regular.ttf           loads at all 13
4x6-font.ttf               loads at all 13
PressStart2P-Regular.ttf   loads at all 13

This is the bug already fixed in clock-simple (#362), countdown (#363), news (#369), tide-display (#370), and mqtt-notifications / youtube-stats (#374): read the face's declared PIXEL_SIZE and retry at it, so picking a bitmap font gives you that font at its own size rather than PIL's default.

Suggested fix

  1. Drop cozette.bdf from all twelve enums — or add the font to the core if it was meant to ship.
  2. Apply the PIXEL_SIZE retry to the plugins that still lack it.

I am fixing both in jellyfin-now-playing as part of its README pass. The remaining eleven are a straightforward sweep, but several are sports scoreboards whose shared files are in flight in #359 and #366, so it is worth doing after those land.

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