Page template renderer: HERO1, HERO2, QUAD, GRID6 #59

Open
opened 2026-08-31 17:55:57 +02:00 by robert · 0 comments
robert commented 2026-08-31 17:55:57 +02:00 (Migrated from git.butzei.de)

Goal

A generic renderer that draws any page descriptor. Replaces the hand-built ride layout originally planned in #9.

Acceptance criteria

  • 20 px status strip on every page: clock, Bluetooth, GPS quality, speed source, ride state - each a distinct glyph or shape, never colour alone
  • HERO1: one field, full 200x208, ~140 px digits
  • HERO2: hero 200x118 plus two cells 100x90; 96 px and 44 px digits
  • QUAD: 2x2 of 100x104, 56 px digits
  • GRID6: 2x3 of 100x69, 40 px digits
  • Custom numeric font subset to digits, ., :, -, / - system fonts stop around 42-49 px and cannot serve HERO1 or HERO2
  • Resource size of the custom font measured and recorded
  • Units rendered in the label, never beside the value
  • Labels checked for overflow in both German and English
  • Degrades without clipping on basalt - GRID6 may fall back to QUAD
  • Render cost measured; must hold 1 Hz updates comfortably

Files

  • watchapp/src/c/page_render.c
  • watchapp/resources/fonts/

Notes

See docs/DESIGN.md section 3.

Update — 2026-09-01: drawn digits, an emphasised slot, and a narrower Phase 1

Three changes.

1 — Digits are drawn, not shipped as fonts (D33). "A custom numeric font", singular, understated
the cost: Pebble bitmap fonts are generated per size, and this design needs 140, 96, 56, 44 and 40
px on emery plus round variants — about eight font resources. Since the glyph set is a dozen
characters, draw them procedurally instead.

  • Digits 09, ., :, -, / drawn procedurally from rounded bars
  • Continuous sizing — any pixel height, on any of the three geometries, without a new resource
  • Zero font resources for numerals; labels keep the system fonts
  • Render cost measured; must hold 1 Hz comfortably
  • Custom numeric font subset and resource size measured — no longer applicable

2 — QUAD and GRID6 get an emphasised slot (D29). As written, both present only equal-weight
numbers, which contradicts NFR-U7 — and two of the three shipped pages are QUAD.

  • Slot 1 of QUAD and GRID6 drawn larger than the rest: one emphasised cell plus three, and
    one plus five
  • Implemented as a size lookup keyed on slot index, not a separate layout path

3 — Phase 1 narrows to emery, HERO2 and QUAD (D32). HERO1 and GRID6 move to Phase 1b
alongside #51 and #62, so the first rideable build lands sooner.

  • Geometry functions take bounds in and give rects out, with no SDK calls, so #68 can test
    them on the host — this is what makes the deferred round work safe to do later

At the corrected ~200 DPI (see the D24 correction), GRID6's 40 px digits are 5.0 mm tall. It ships,
but it is not a default and should not be recommended in the configuration UI.

Update — 2026-09-02: render the two states differently

  • Greyed (stale) and -- (unavailable) are visually distinct, not the same treatment (D44)
  • Per rule 2 in docs/DESIGN.md, neither state is signalled by colour alone (#56)
## Goal A generic renderer that draws any page descriptor. Replaces the hand-built ride layout originally planned in #9. ## Acceptance criteria - [ ] 20 px status strip on every page: clock, Bluetooth, GPS quality, speed source, ride state - each a distinct glyph or shape, never colour alone - [ ] `HERO1`: one field, full 200x208, ~140 px digits - [ ] `HERO2`: hero 200x118 plus two cells 100x90; 96 px and 44 px digits - [ ] `QUAD`: 2x2 of 100x104, 56 px digits - [ ] `GRID6`: 2x3 of 100x69, 40 px digits - [ ] Custom numeric font subset to digits, `.`, `:`, `-`, `/` - system fonts stop around 42-49 px and cannot serve HERO1 or HERO2 - [ ] Resource size of the custom font measured and recorded - [ ] Units rendered in the label, never beside the value - [ ] Labels checked for overflow in both German and English - [ ] Degrades without clipping on `basalt` - `GRID6` may fall back to `QUAD` - [ ] Render cost measured; must hold 1 Hz updates comfortably ## Files - `watchapp/src/c/page_render.c` - `watchapp/resources/fonts/` ## Notes See docs/DESIGN.md section 3. ## Update — 2026-09-01: drawn digits, an emphasised slot, and a narrower Phase 1 **Three changes.** **1 — Digits are drawn, not shipped as fonts (D33).** "A custom numeric font", singular, understated the cost: Pebble bitmap fonts are generated **per size**, and this design needs 140, 96, 56, 44 and 40 px on `emery` plus round variants — about eight font resources. Since the glyph set is a dozen characters, draw them procedurally instead. - [ ] Digits `0`–`9`, `.`, `:`, `-`, `/` drawn procedurally from rounded bars - [ ] Continuous sizing — any pixel height, on any of the three geometries, without a new resource - [ ] **Zero font resources for numerals**; labels keep the system fonts - [ ] Render cost measured; must hold 1 Hz comfortably - [ ] ~~Custom numeric font subset~~ and ~~resource size measured~~ — no longer applicable **2 — `QUAD` and `GRID6` get an emphasised slot (D29).** As written, both present only equal-weight numbers, which contradicts NFR-U7 — and two of the three shipped pages are `QUAD`. - [ ] **Slot 1 of `QUAD` and `GRID6` drawn larger than the rest**: one emphasised cell plus three, and one plus five - [ ] Implemented as a size lookup keyed on slot index, not a separate layout path **3 — Phase 1 narrows to `emery`, `HERO2` and `QUAD` (D32).** `HERO1` and `GRID6` move to Phase 1b alongside #51 and #62, so the first rideable build lands sooner. - [ ] Geometry functions take bounds in and give rects out, with **no SDK calls**, so #68 can test them on the host — this is what makes the deferred round work safe to do later At the corrected ~200 DPI (see the D24 correction), `GRID6`'s 40 px digits are 5.0 mm tall. It ships, but it is not a default and should not be recommended in the configuration UI. ## Update — 2026-09-02: render the two states differently - [ ] Greyed (stale) and `--` (unavailable) are visually distinct, not the same treatment (D44) - [ ] Per rule 2 in `docs/DESIGN.md`, neither state is signalled by colour alone (#56)
Sign in to join this conversation.
No description provided.