fix(ledmatrix-stocks): make the bitmap fonts work, and document every setting - #394
Merged
Conversation
… setting A .bdf is a bitmap face that exists at exactly one pixel size. Choosing 5x7.bdf or 4x6.bdf at any other size raised inside FreeType, and the renderer caught it and substituted PressStart2P with a log warning -- so the font menu appeared to work while quietly ignoring the choice at twelve of the thirteen offered sizes. Bitmap faces now load at their declared PIXEL_SIZE instead. cozette.bdf is removed from all six font menus: the core ships no file of that name, so it could never load at any size (#387). README: real rendered screenshots throughout -- a gain, a loss, a crypto entry, both display modes, the inline chart on and off, and four panel sizes -- all from a recorded quote seeded into the cache the plugin already reads. The eight per-element colour keys were previously one sentence ("green for positive deltas and red for negative"); they are now a table, including the detail that price_delta has no text_color because its colour comes from the sign of the change. That takes the plugin to 41 of 41 settings documented. The scroll shots use the frames option from #369: the ticker starts off-panel, so frame 0 of a scrolling plugin is blank. 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 |
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 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.
The font bug
A
.bdfis a bitmap face that exists at exactly one pixel size. Choosing5x7.bdfor4x6.bdfat any other size raised inside FreeType, anddisplay_renderer.pycaught it and substituted PressStart2P:So the font menu appeared to work while silently ignoring the choice at twelve of the thirteen sizes the schema offers. Bitmap faces now load at their declared
PIXEL_SIZEwhen the requested size is unavailable — the same fix already merged forclock-simple(#362),countdown(#363),news(#369),tide-display(#370),mqtt-notifications/youtube-stats(#374) and proposed forjellyfin-now-playing(#388).cozette.bdfis removed from all six font menus. The core ships no file of that name, so selecting it could never work — see #387.Same MINOR-vs-MAJOR judgement as #388: removing an enum value is a "removed option", but no working configuration can break because the value never loaded. 2.8.0 → 2.9.0.
Images
The plugin had none. All of these are real output, rendered from a recorded quote seeded into the cache the plugin already reads:
display_modescrollvsswitchtoggle_charton and offThese use the
framesoption from #369, which is what made them possible: frame 0 of a scrolling plugin is blank, because the ticker starts off-panel. My first render came out empty for exactly that reason.The crypto row is rendered at 256 wide rather than 128 — the
-812.00 (-1.3%)line is genuinely wider than a 128px panel, so no single frame of it fits there. The caption says so rather than showing a half-cropped line.Settings
The eight per-element colour keys were covered by one sentence — "green for positive deltas and red for negative". They are now a table, including that
price_deltahas notext_colorbecause its colour is picked by the sign of the change. 41 of 41 settings are documented; the config-token audit drops nothing.One thing worth knowing
check_plugin.pypasses 8/8, but every size reports "drew nothing but display() returned None". The plugin ships notest/harness.json, so the harness has no quote data, and a scroll's first frame is blank regardless — meaning the safety harness has never actually exercised this plugin's rendering. Filed separately as #395.🤖 Generated with Claude Code