Grilling: type selector — slots, roles, v1 defaults #70

Closed
opened 2026-10-05 11:18:32 +02:00 by AlexKucera · 1 comment
Owner

Part of #20

Question

Alexander's steer (2026-10-05): typography becomes a Settings type selector — one slot for sans, one for serif — instead of a hard-coded face decision. Faces are runtime-mutable; this ticket decides the selector's shape and the v1 defaults, not a fixed pairing. Decide:

  • Selector shape — NSFontPanel via a "Choose…" button per slot (macOS-native, free) vs curated dropdown of known-good faces vs plain face-name field. Ponytail lean: the least code that names a face and falls back cleanly.
  • Role mapping — v1 proposal: body text = sans slot (Concourse OT), headings = serif slot. Fixed assignment for v1 (swapping slot contents tries the reverse during calibration), or assignment itself selectable?
  • v1 defaults — sans slot: Concourse OT (body weight call: Book 3 vs Medium 4 — no Regular exists; verify exact PostScript names from ~/Library/Fonts/Concourse OT*.otf in-session before NSFont(name:)). Serif slot: Iowan Old Style (spike-proven) vs Charter vs Georgia. Missing face → silent system fallback.
  • Where it bites — does the pair apply to both styled-source editing AND reading mode? UI chrome (mono labels, system faces today) untouched?
  • Persistence + tokens — app-level UserDefaults (two face names, weight if needed); DesignTokens gains named-face-with-fallback prose tokens. Per-post overrides: out.
  • Scale values — selector covers faces only; body size (17), heading scale (26/20), spacing rhythm stay design-token values entering calibration. Selector exposes size too? Default: no.

Licensing dissolves for v1 — no fonts ship in the bundle; the selector names machine-local faces. Bundling licensed fonts is a later, separate decision.

[Generated by AI]

Part of #20 ## Question Alexander's steer (2026-10-05): typography becomes a **Settings type selector** — one slot for sans, one for serif — instead of a hard-coded face decision. Faces are runtime-mutable; this ticket decides the selector's shape and the v1 defaults, not a fixed pairing. Decide: - **Selector shape** — NSFontPanel via a "Choose…" button per slot (macOS-native, free) vs curated dropdown of known-good faces vs plain face-name field. Ponytail lean: the least code that names a face and falls back cleanly. - **Role mapping** — v1 proposal: body text = sans slot (Concourse OT), headings = serif slot. Fixed assignment for v1 (swapping slot contents tries the reverse during calibration), or assignment itself selectable? - **v1 defaults** — sans slot: Concourse OT (body weight call: Book 3 vs Medium 4 — no Regular exists; verify exact PostScript names from `~/Library/Fonts/Concourse OT*.otf` in-session before `NSFont(name:)`). Serif slot: Iowan Old Style (spike-proven) vs Charter vs Georgia. Missing face → silent system fallback. - **Where it bites** — does the pair apply to both styled-source editing AND reading mode? UI chrome (mono labels, system faces today) untouched? - **Persistence + tokens** — app-level UserDefaults (two face names, weight if needed); `DesignTokens` gains named-face-with-fallback prose tokens. Per-post overrides: out. - **Scale values** — selector covers faces only; body size (17), heading scale (26/20), spacing rhythm stay design-token values entering calibration. Selector exposes size too? Default: no. Licensing dissolves for v1 — no fonts ship in the bundle; the selector names machine-local faces. Bundling licensed fonts is a later, separate decision. [Generated by AI]
AlexKucera added the wayfinder:grilling label 2026-10-05 11:18:32 +02:00
AlexKucera added a new dependency 2026-10-05 11:18:52 +02:00
AlexKucera self-assigned this 2026-10-05 12:47:39 +02:00
Author
Owner

Resolution

Three role-named slots, full family list, sizes in.

  1. Selector shape — SwiftUI Picker per slot listing all NSFontManager.availableFontFamilies. Full list now so Alexander can audition faces for the defaults; shrinks to a curated shortlist once defaults settle (graduated to map fog). No NSFontPanel, no typed face-name field.
  2. Slot names — Body / Headings / Code, named by role, not by font class: both prose slots draw from the same pool, so "sans"/"serif" stopped being true the moment the lists merged. UserDefaults keys proseBodyFace / proseHeadingsFace / proseCodeFace (+ one size each).
  3. Role mapping — fixed assignment (Body slot → body text, Headings slot → headings, Code slot → mono in prose). Assignment itself not selectable; the calibration swap experiment works by changing slot contents.
  4. v1 defaults (faces verified in-session via NSFontManager):
    • Body = Concourse OT, Book weight — family "Concourse OT", PostScript ConcourseOT3Book, NSFontManager weight 4 (Medium ConcourseOT4Medium is weight 5; escalate only if calibration calls Book faint). Resolve via font(withFamily:"Concourse OT", traits: [], weight: 4, size:).
    • Headings = Iowan Old Style bold (spike-proven; holds steady while body flips — one isolated variable).
    • Code = UbuntuMono Nerd Font Mono — family "UbuntuMono Nerd Font Mono", PostScript UbuntuMonoNFM, Regular (weight 5). The Mono suffix variant is the fixed-width one; plain and Propo variants also installed but not wanted.
    • Missing face → silent system fallback through the existing ?? systemFont seam in ProsePresenter.
  5. Sizes — each slot is {face, size}: Body 17, Headings 26, Code 13 (today's values entering calibration). h2 derives from the Headings size by ratio (20/26 ≈ 0.77, one constant). Explicit per-level heading sizes: out.
  6. Where it bites — both prose surfaces: styled-source editing AND reading mode read the same tokens. UI chrome (mono metadata labels, nav/post titles) stays on system faces.
  7. Persistence + tokens — app-level UserDefaults, six values (3 faces + 3 sizes), registered defaults = the v1 set; no reset button (re-picking is reset). Face resolution lives in ProsePresenter beside the existing bodyFont seam (proseBodyFont / proseHeadingFont / code font, named-face-with-fallback). Per-post overrides: out. No fonts bundle in v1 — faces are machine-local; licensing deferred.

[Generated by AI]

## Resolution **Three role-named slots, full family list, sizes in.** 1. **Selector shape** — SwiftUI `Picker` per slot listing **all** `NSFontManager.availableFontFamilies`. Full list now so Alexander can audition faces for the defaults; shrinks to a curated shortlist once defaults settle (graduated to map fog). No NSFontPanel, no typed face-name field. 2. **Slot names** — **Body / Headings / Code**, named by role, not by font class: both prose slots draw from the same pool, so "sans"/"serif" stopped being true the moment the lists merged. UserDefaults keys `proseBodyFace` / `proseHeadingsFace` / `proseCodeFace` (+ one size each). 3. **Role mapping** — fixed assignment (Body slot → body text, Headings slot → headings, Code slot → mono in prose). Assignment itself not selectable; the calibration swap experiment works by changing slot contents. 4. **v1 defaults** (faces verified in-session via NSFontManager): - **Body = Concourse OT**, Book weight — family `"Concourse OT"`, PostScript `ConcourseOT3Book`, NSFontManager weight **4** (Medium `ConcourseOT4Medium` is weight 5; escalate only if calibration calls Book faint). Resolve via `font(withFamily:"Concourse OT", traits: [], weight: 4, size:)`. - **Headings = Iowan Old Style** bold (spike-proven; holds steady while body flips — one isolated variable). - **Code = UbuntuMono Nerd Font Mono** — family `"UbuntuMono Nerd Font Mono"`, PostScript `UbuntuMonoNFM`, Regular (weight 5). The `Mono` suffix variant is the fixed-width one; plain and `Propo` variants also installed but not wanted. - Missing face → silent system fallback through the existing `?? systemFont` seam in `ProsePresenter`. 5. **Sizes** — each slot is {face, size}: Body **17**, Headings **26**, Code **13** (today's values entering calibration). h2 derives from the Headings size by ratio (20/26 ≈ **0.77**, one constant). Explicit per-level heading sizes: out. 6. **Where it bites** — both prose surfaces: styled-source editing AND reading mode read the same tokens. UI chrome (mono metadata labels, nav/post titles) stays on system faces. 7. **Persistence + tokens** — app-level UserDefaults, six values (3 faces + 3 sizes), registered defaults = the v1 set; no reset button (re-picking is reset). Face resolution lives in `ProsePresenter` beside the existing `bodyFont` seam (`proseBodyFont` / `proseHeadingFont` / code font, named-face-with-fallback). Per-post overrides: out. No fonts bundle in v1 — faces are machine-local; licensing deferred. [Generated by AI]
Sign in to join this conversation.