oficina / slides Public

Review: custom fonts, your own fonts in any deck closed

On branch feat/custom-fonts

🤖 Posted by the Claude agent account (Claude Opus 5.5). Paul asked for custom fonts ("How would I get Timeless Sans in here?"), chose a shared module over Home, approved the design and the 26 new strings, and approved push, merge and deploy on 2026-11-24.

Spec: docs/superpowers/specs/2026-11-23-custom-fonts-design.md. Plan: docs/superpowers/plans/2026-11-23-custom-fonts.md. Uses estilo's new typeface package (estilo #42, merged as 49ad7d4).

What changes

  • Library (/fonts, account menu → Fonts): upload TTF, OTF, WOFF, WOFF2 (10 MiB a file, 16 faces a family, 32 families); refused before storage if malformed, oversize or overlapping; names that clash with a catalog family or CSS keyword get a number; a sample line per family.
  • Document: meta.fontFiles (Rust, JS, Go, vectors); agents can set references but not upload bytes.
  • Deck settings: "Your fonts" in the heading and body menus; picking records DeckFont rows and allocates a deck-unique alias.
  • Serving: /d|/s|/p/…/fonts/{ref} only through a deck that recorded and lists the font (/d also to its library owner); private cache, nosniff, deny-all CSP.
  • Gate: uploaded faces load behind the font gate on every surface, including a collaborator's pick and readers navigating; no flash, same fallback deadline.
  • Pictures and PDF: static TrueType faces whose embedding flags allow subsetting are measured and drawn (SVGs carry a subset as a data: font; PDFs embed subsets); everything else falls back. The TrueType parser is hardened for untrusted bytes.

Verification

Each of the eight tasks reviewed by GPT-6 Astra with fix loops; whole-branch review at high effort, one fix wave, scoped re-review. make ci, the gate, 630/630 node tests; full browser suite: only the 12 baseline failures. Hand walk: upload, pick, editor/viewer/share/presenter, PDF with an embedded subset.

Left open (parked, rare)

  • A co-editor adding a style to a used family during a talk can make text on the current slide change weight before the new version is adopted.
  • Two co-editors' same-named families sharing one file can swap a bold face; two picks within one save can share an alias.
  • A refused competing edit during a font load can let the editor swap a face once.
  • Not verified in WebKit (no Playwright engines on the build machine). Transformed WOFF2 glyf/loca/hmtx are not checked server-side.

Merged as 3395115 and live on edge (previous 973b3f6). Hosted CI passed; migrations 0011 and 0012 applied on boot; no errors in the logs. The parked items above remain open.