fix(clock-simple): make the bitmap fonts work, and document every setting - #362
Merged
Conversation
…ting Three of the six fonts in the picker did nothing, each for its own reason, and all three failed the same way: a warning in the log and a silent fall back to the default face, so the setting looked broken rather than misconfigured. A .bdf is a bitmap face that exists at exactly one pixel size. The loader asked for font_size (8 by default), FreeType answered "invalid pixel size" for every .bdf, and the clock used the default font -- 5x7.bdf and 4x6.bdf rendered byte-identical to PressStart2P-Regular.ttf. They are now retried at the size the file's own PIXEL_SIZE header declares. Verified by rendering all six and hashing: before, four of six were the same image; after, all five remaining fonts are distinct. cozette.bdf is removed from the three font pickers. The file is shipped by neither the core nor the plugin, so choosing it could only ever fall back to the default. Removing a schema option would normally be a major bump, but this one has never functioned, so no working configuration can depend on it -- hence minor. Say the word if you would rather it stayed listed and merely documented. The README is rewritten around real rendered screenshots and now covers all 20 settings. Things it previously left unsaid: enabled defaults to false, which is the usual reason a fresh install shows nothing; the timezone resolution order (plugin, then global, then system, with no UTC fallback); that font_size applies only to scalable .ttf faces; that 24h mode never draws the AM/PM element at all; and how the text shrinks and the date falls back through shorter forms -- "September 2nd" to "Sep 2nd" to "Sep 2" -- to fit a narrow panel, which the 64x32 shot shows. Config-token audit against the old README: nothing dropped, no broken TOC anchors, and all 20 schema leaves documented. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The config-token audit only looks at settings, so it did not catch that the rewrite dropped a prose section: how to preview a change with the core's dev_server.py and --extra-dir, and the pointer to DEV_PREVIEW.md. Worth having -- it is the fastest loop for anyone changing this plugin, and nothing else in the README says it exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 9 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This was referenced Sep 2, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth plugin in the README pass. Went for a non-sports plugin this round because #359 touches all seven remaining scoreboards — working one of those now would guarantee a conflict and force a re-render. I'll pick the scoreboards back up once it lands.
Three of six fonts did nothing
Generating the font comparison grid, four of the six options rendered byte-identical:
Two separate causes, both failing the same silent way — a warning in the log and a fall back to the default face, so the setting looked broken rather than misconfigured:
5x7.bdfand4x6.bdf— a.bdfis a bitmap face that exists at exactly one pixel size. The loader asked forfont_size(8 by default) and FreeType answeredinvalid pixel sizefor every.bdf. The code comment even said "FreeType handles .ttf and (at its native size) .bdf faces" — the constraint was known, the size just was never passed. Now retried at the size the file's ownPIXEL_SIZEheader declares (7 and 6 respectively).cozette.bdf— the file isn't shipped by the core or the plugin.cannot open resource. It's a phantom option, removed from the three pickers.After the fix all five remaining fonts render distinctly:
On the version bump: removing a schema enum option would normally be major. This one has never functioned, so no working config can depend on it — hence minor. Happy to keep it listed and merely documented as unavailable if you'd rather.
README
Rewritten around real screenshots, covering all 20 settings. Things it previously left unsaid:
enableddefaults tofalse— unlike most plugins here, and the usual reason a fresh install shows nothing.font_sizeapplies only to scalable.ttffaces; a.bdfignores it by nature.24hmode never draws the AM/PM element at all.September 2nd→Sep 2nd→Sep 2— which the 64×32 shot shows in action.Verification
python scripts/check_plugin.py --plugin clock-simple— 8/8 PASS, goldens matchpython scripts/render_docs_assets.py --plugin clock-simple --check— images matchpython scripts/check_module_collisions.py— OK across 43 pluginsplugins.jsonregenerated🤖 Generated with Claude Code