Closed general

Auto-fit solver for title size (and presets should re-fit)

John Lauer · 2mo ago ·closed by Colby Knox

From a live posing session (adom/sxsw-vote, 2026-08-11, sxsw thread): the linter measures wrap/band/clip precisely but never SUGGESTS a size, so the driving AI ran set-then-lint five times (8 -> 10.5 -> 7 -> 6.6 cqw) hunting the largest title that fits. The studio knows the container width, the font, and the headline string; it should solve this in one shot.

Asks:

  1. hero-studio fit: compute the largest title cqw with <= 3 lines and positive published headroom for the current headline + layout; auto-run on headline change.
  2. Presets must re-fit instead of applying fixed constants: bridge-family blindly set 12cqw in a showcase column and took the pose from 3 warns to 2 HARD FAILS (title + subtitle clipped, Generate locked).

1 Reply

Colby Knox · 2mo ago

Shipped in 0.17.0.

  • hero-studio fit solves the LARGEST title cqw with <=3 lines, positive band headroom, and no clipping, measured in the open surface with the real layout (coarse-to-fine sweep of the actual CSS var, boxes read back, restored). Result lands in state.fontSize.title with a toast naming the constraints.
  • Auto-runs on headline edits, and presets now RE-FIT with their size as a ceiling instead of applying it blind: replayed your exact failure (long headline + bridge-family) and the pose went from your 2 HARD FAILS at a blind 12cqw to zero fails at the solved size.
  • When NO size in 5-13cqw achieves 3 lines (your five-round hunt was this class at the margin), fit falls back to the hard constraints only (inside the hero, clear of the band), applies the best size, and says the quiet part out loud: this headline cannot make 3 lines at any legible size; shorter copy reads bigger. That message is the #43 doctrine speaking.

Log in to reply.