Improvements Wishlist

Plugin API: the setpoint digits as Font::DIGITS, for large numbers on large tiles

Completed

StofLESuggested this wish Β·

A plugin's largest font today is Font::VALUE (watch_value, 38 px on the standard look). On a large tile that leaves the numbers small: my Custom card plugin on a 3x2 tile of the 7-inch JC1060P470 shows two counts and a bar, and the numbers use a fraction of the room (first photo). Tessera's own cards in that room take the setpoint digits.

The setpoint digits are already in every build (setpoint_digits in packages/core.yaml, 64 px on the standard look), so handing them to plugins costs no flash and keeps the fixed set of fonts. I tried this on dev at 0ce92b27, on the 7-inch:

--- a/components/smart_display/plugin_api.h
+++ b/components/smart_display/plugin_api.h
-enum class Font : uint8_t { VALUE, HEADLINE, TITLE, BODY_LARGE, BODY, ICON, ICON_SMALL };
+// DIGITS: the climate card's setpoint digits, larger than VALUE; only digits, '-', '.', ',', 'Β°' and '%'.
+enum class Font : uint8_t { VALUE, HEADLINE, TITLE, BODY_LARGE, BODY, ICON, ICON_SMALL, DIGITS };
--- a/components/smart_display/plugin_host.cpp
+++ b/components/smart_display/plugin_host.cpp
     case Font::ICON_SMALL: face = rt::mini_icon_font; break;    // materialdesign_icons_mini
+    case Font::DIGITS: face = rt::setpoint_font ? rt::setpoint_font : rt::watch_value_font; break;  // setpoint_digits

The new value goes last, so nothing else moves. The plugin takes DIGITS only where every value it shows has just those glyphs and the face fits, as runtime_tiles does with face_covers(setpoint_font, value), and otherwise steps down to VALUE as before (second photo: the same card with DIGITS). A card with a word among its values (a lock's "open", a state of "unknown") stays in VALUE for all its values, so one card keeps one size; it is decided again with every new value. A large face with every letter would cost flash on every board, the 4 MB ones first, which is why I'd keep it to the digits that are already there. It would need a new minor of the plugin API, so a plugin that uses it is refused by older firmware.

Would you take this, or would you rather offer large digits another way?

Photos: 1: Zutritt 3x2 today (38 px), relatively small on large tile: WhatsApp Image 2026 10 11 at 14.08.19

2: Zutritt 3x2 with DIGITS: WhatsApp Image 2026 10 11 at 14.08.19 (1)

3: Wohnzimmer-Card with DIGITS: WhatsApp Image 2026 10 11 at 14.08.19 (2)

Stefan

Discussion 1

Add a comment
MaxGramser Admin

Thanks Stefan, taken as you proposed. It is on dev now, as part of plugin API 0.9:

  • Font::DIGITS is the climate card's setpoint_digits (64 px on the standard look, 40 on the compact one). It goes last in the enum, so nothing else moves. A board without that font falls back to VALUE. No new font and no flash on any board.
  • ui::covers(text, font) says whether a font has every character of a text. A tile takes DIGITS only for a value made of digits, and steps down to VALUE for anything else, as you described.

Tested with the core's host probe plugin on the CYD and the Guition, built for the host: DIGITS has a 47 px line against VALUE's 26 on the CYD, and covers is true for -21,5Β° and false for open. A plugin that uses it names api: "0.9" and builds only on firmware that has it. That comes with the next release, usually within a week; until then Tessera's dev firmware has it. The plugins repository's docs/FIRMWARE_API.md and tools/check.py know it already.

Something new for plugin makers came out of this: a bench in the plugins repository. python3 tools/preview.py --setup once, then python3 tools/preview.py <your plugin folder>. It builds your plugin into the real firmware of a small, a middle, a standing and a 10-inch screen (or any glass you name with --screen 1024x600@7, and any grid with --grid), and shows every tile at every size, light and dark, every card, the top bar and the settings page on one page. It also lists what it finds wrong: a word too faint to read in dark mode, a label cut off, a part outside its tile or over another part. A plugin with API 0.9 is built on dev by itself. docs/PREVIEW.md explains it all, and it might help with your Custom card.

Add your thoughts, a screenshot or a useful link.

Markdown & basic HTML
Paste or drop images Β· URLs on their own line become previews0 / 10,000
Create your account to join in

We need a verified email address to reach you about your contribution. Your address stays private.

Continue with GitHub

Your draft stays in this tab. Return here after verification.