[PR #3635] [MERGED] Launcher: night tokens and Bricolage Grotesque (redesign R1, draft) #5109

Closed
opened 2026-11-03 05:10:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3635
Author: @ludovic111
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

Base: main ← Head: feat/launcher-night-tokens


📝 Commits (3)

  • 99071a1 Launcher: night tokens and Bricolage Grotesque in horizon-theme
  • 1949707 Night: pixel-cut plate corners, Geist's Cyrillic merged into Bricolage
  • 9d53e6c Merge origin/main into feat/launcher-night-tokens

📊 Changes

14 files changed (+711 additions, -25 deletions)

View changed files

➕ crates/horizon-theme/fonts/BricolageGrotesque-Bold.ttf (+0 -0)
➕ crates/horizon-theme/fonts/BricolageGrotesque-Medium.ttf (+0 -0)
➕ crates/horizon-theme/fonts/BricolageGrotesque-Regular.ttf (+0 -0)
➕ crates/horizon-theme/fonts/BricolageGrotesque-SemiBold.ttf (+0 -0)
➕ crates/horizon-theme/fonts/BricolageGrotesqueDisplay-Bold.ttf (+0 -0)
➕ crates/horizon-theme/fonts/OFL-BricolageGrotesque.txt (+95 -0)
📝 crates/horizon-theme/src/lib.rs (+29 -5)
➕ crates/horizon-theme/src/night.rs (+270 -0)
📝 crates/horizon-theme/tokens.css (+84 -0)
📝 docs/design-system.md (+56 -1)
📝 launcher/src/main.rs (+5 -6)
📝 launcher/src/theme.rs (+11 -11)
📝 launcher/src/themes/tests.rs (+2 -2)
➕ tools/bake_bricolage.py (+159 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Draft: not for merge until Ludovic has seen the screenshots. First step (R1) of the launcher redesign
whose mockups Ludovic approved on 2026-10-29. Stack: this PR → R1b (specimen page) → R2 (the night sky).

What

  • horizon_theme::night (new module): the night look's tokens. NIGHT, plus DAWN for players who
    pick Light. Each has six sky stops, plates (card, card_hi) with their opacity, stroke and rule,
    ink / ink_soft / muted, one accent (accent fills, accent_hi for text and the focus ring), and
    success / warn / danger. Also type steps (night-display 56, night-title 20, night-ui 14,
    night-caption 12), corners (plates cut in two 4 px pixel steps, PIXEL_CORNER; the main action
    one step; other controls round at 8) and the Play height.
  • Bricolage Grotesque (SIL OFL 1.1, fonts/OFL-BricolageGrotesque.txt, no reserved name): five static
    cuts from upstream's variable font, made by tools/bake_bricolage.py (fontTools instancer; GPUI picks
    fonts by family and weight). The UI family is cut at opsz 14 in 400, 500, 600 and 700. The display
    family Bricolage Grotesque Display is 700 at opsz 72. ~98 KiB each.
  • Cyrillic from Geist (Ludovic's call, 2026-10-29): Bricolage has none, so the bake merges Geist's
    (SIL OFL 1.1, fonts/OFL-Geist.txt, no reserved name) into every cut. Cyrillic letters drawn like
    Latin ones (А, В, Е, О, Р, С, у…) reuse Bricolage's Latin glyphs; the others are Geist's outlines,
    scaled to Bricolage's cap and x-heights, from the Geist weight whose stems match. Each cut's
    copyright notice and the OFL file name both sources. 134 Cyrillic code points, all of Russian.
  • Contrast tests: night_text_meets_wcag_aa_over_the_sky checks every text colour, in both
    appearances, at ≥ 4.5:1 on both plates over all six sky stops. It also checks text without a plate on
    the upper three stops, the page and the sidebar, and the white Play label on the accent. The existing
    Blocks AA test also runs on Night::blocks().
  • tokens.css gains --night-* (colours, fonts, type, radii) in both appearances. The Blocks variables
    the website uses today are unchanged, so the site doesn't move until it opts in.
  • Launcher theme.rs reads the night tokens. Screens not rebuilt yet draw their Blocks parts in the
    night's colours (Night::blocks(): opaque plates over the page, soft strokes instead of dark outlines),
    and Bricolage replaces Geist and Pixelify Sans in the launcher. The launcher no longer loads Geist sans
    or Pixelify (Geist Mono stays for paths and codes). The game's menus (ui_theme.rs) are untouched.
  • docs/design-system.md: a "Night" section (principles, type and colour tables).

Two departures from the R0 draft tokens, both for AA:

  • accent is #7656fa instead of #7c5cff, so white 14 px labels pass (4.35 → 4.69).
  • muted is #a59fc6 instead of #9a93bd.

Known limits:

  • GPUI has no letter spacing, so the tracking tokens apply on the web only. The opsz 72 display cut is
    tighter by design.

Screenshots (real launcher, scratch homes, 1280×800 at 1x)

On the Mac mini (not attached here until Ludovic has seen them):

  • ~/builds/horizon/launcher-redesign-1/r1-specimen-night-1280x800.png
  • ~/builds/horizon/launcher-redesign-1/r1-specimen-dawn-1280x800.png
  • ~/builds/horizon/launcher-redesign-1/r1-home-night-1280x800.png

Performance (horizon-launcher benchmark --repeats 5, Mac mini M4 Pro)

The Mac mini was very loaded during these runs (load average 38–113), so the starts are noisy. Under the
same load, main and this PR land in the same range:

Run Load (1 min) Cold start Warm starts (mean) RSS Idle CPU
main 38 319 ms 180 ms 159 MB 8.8 % (one 41 % outlier)
main 113 853 ms 785 ms 160 MB 8.0 %
main ~95 1074 ms 1174 ms – –
R1 81 1434 ms 1181 ms 161 MB 0.7 %
R1 ~80 616 ms 824 ms – –

Fonts loaded at start: 5 Bricolage + Geist Mono (was 3 Geist + Geist Mono + 3 Pixelify). The binary is
148 KB smaller.

Self-check

pr_ready ran on the stack top (this PR + R1b). Their tree is identical to what is pushed. R1 alone was
checked again with cargo clippy --all-targets -D warnings on the launcher.

| Scope | ⚠️ 15 files, +927 −26 (R1 + R1b together; R1 alone: 14 files, +610 −25, of which 93 OFL text, 85 generated CSS, 55 docs) |
| Cargo.lock | ✅ unchanged |
| Public tree | ✅ |
| Python tests | ✅ 408 passed |
| rustfmt | ✅ |
| clippy | ✅ |
| tests: horizon-theme | ✅ 9 passed |
| tokens.css up to date | ✅ |
| launcher rustfmt | ✅ |
| launcher clippy | ✅ |
| launcher tests | ✅ 254 passed |
| Parity | ➖ 31 affected (horizon-theme is read by the game), to run in CI |

Ludovic's answers (2026-10-29)

  1. Style approved. 2. Corners: pixel-cut. 3. Cyrillic: Geist. 4. The accent and muted tweaks accepted.
    Stays a draft until he has seen the next screenshots.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3635 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-night-tokens` --- ### 📝 Commits (3) - [`99071a1`](https://github.com/horizon-rust/horizon/commit/99071a1160ae48fc24cee091b052e927efd66c07) Launcher: night tokens and Bricolage Grotesque in horizon-theme - [`1949707`](https://github.com/horizon-rust/horizon/commit/194970773dea2078e6eb509ce6d71b34d688ae7f) Night: pixel-cut plate corners, Geist's Cyrillic merged into Bricolage - [`9d53e6c`](https://github.com/horizon-rust/horizon/commit/9d53e6ce357871fc14709cf398ea03cf0e68ceef) Merge origin/main into feat/launcher-night-tokens ### 📊 Changes **14 files changed** (+711 additions, -25 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-theme/fonts/BricolageGrotesque-Bold.ttf` (+0 -0) ➕ `crates/horizon-theme/fonts/BricolageGrotesque-Medium.ttf` (+0 -0) ➕ `crates/horizon-theme/fonts/BricolageGrotesque-Regular.ttf` (+0 -0) ➕ `crates/horizon-theme/fonts/BricolageGrotesque-SemiBold.ttf` (+0 -0) ➕ `crates/horizon-theme/fonts/BricolageGrotesqueDisplay-Bold.ttf` (+0 -0) ➕ `crates/horizon-theme/fonts/OFL-BricolageGrotesque.txt` (+95 -0) 📝 `crates/horizon-theme/src/lib.rs` (+29 -5) ➕ `crates/horizon-theme/src/night.rs` (+270 -0) 📝 `crates/horizon-theme/tokens.css` (+84 -0) 📝 `docs/design-system.md` (+56 -1) 📝 `launcher/src/main.rs` (+5 -6) 📝 `launcher/src/theme.rs` (+11 -11) 📝 `launcher/src/themes/tests.rs` (+2 -2) ➕ `tools/bake_bricolage.py` (+159 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Draft: not for merge until Ludovic has seen the screenshots.** First step (R1) of the launcher redesign whose mockups Ludovic approved on 2026-10-29. Stack: this PR → R1b (specimen page) → R2 (the night sky). ## What - `horizon_theme::night` (new module): the night look's tokens. `NIGHT`, plus `DAWN` for players who pick Light. Each has six sky stops, plates (`card`, `card_hi`) with their opacity, stroke and rule, ink / ink_soft / muted, one accent (`accent` fills, `accent_hi` for text and the focus ring), and success / warn / danger. Also type steps (`night-display` 56, `night-title` 20, `night-ui` 14, `night-caption` 12), corners (plates cut in two 4 px pixel steps, `PIXEL_CORNER`; the main action one step; other controls round at 8) and the Play height. - **Bricolage Grotesque** (SIL OFL 1.1, `fonts/OFL-BricolageGrotesque.txt`, no reserved name): five static cuts from upstream's variable font, made by `tools/bake_bricolage.py` (fontTools instancer; GPUI picks fonts by family and weight). The UI family is cut at opsz 14 in 400, 500, 600 and 700. The display family `Bricolage Grotesque Display` is 700 at opsz 72. ~98 KiB each. - **Cyrillic from Geist** (Ludovic's call, 2026-10-29): Bricolage has none, so the bake merges Geist's (SIL OFL 1.1, `fonts/OFL-Geist.txt`, no reserved name) into every cut. Cyrillic letters drawn like Latin ones (А, В, Е, О, Р, С, у…) reuse Bricolage's Latin glyphs; the others are Geist's outlines, scaled to Bricolage's cap and x-heights, from the Geist weight whose stems match. Each cut's copyright notice and the OFL file name both sources. 134 Cyrillic code points, all of Russian. - **Contrast tests:** `night_text_meets_wcag_aa_over_the_sky` checks every text colour, in both appearances, at ≥ 4.5:1 on both plates over all six sky stops. It also checks text without a plate on the upper three stops, the page and the sidebar, and the white Play label on the accent. The existing Blocks AA test also runs on `Night::blocks()`. - `tokens.css` gains `--night-*` (colours, fonts, type, radii) in both appearances. The Blocks variables the website uses today are unchanged, so the site doesn't move until it opts in. - Launcher `theme.rs` reads the night tokens. Screens not rebuilt yet draw their Blocks parts in the night's colours (`Night::blocks()`: opaque plates over the page, soft strokes instead of dark outlines), and Bricolage replaces Geist and Pixelify Sans in the launcher. The launcher no longer loads Geist sans or Pixelify (Geist Mono stays for paths and codes). The game's menus (`ui_theme.rs`) are untouched. - `docs/design-system.md`: a "Night" section (principles, type and colour tables). Two departures from the R0 draft tokens, both for AA: - `accent` is `#7656fa` instead of `#7c5cff`, so white 14 px labels pass (4.35 → 4.69). - `muted` is `#a59fc6` instead of `#9a93bd`. Known limits: - GPUI has no letter spacing, so the tracking tokens apply on the web only. The opsz 72 display cut is tighter by design. ## Screenshots (real launcher, scratch homes, 1280×800 at 1x) On the Mac mini (not attached here until Ludovic has seen them): - `~/builds/horizon/launcher-redesign-1/r1-specimen-night-1280x800.png` - `~/builds/horizon/launcher-redesign-1/r1-specimen-dawn-1280x800.png` - `~/builds/horizon/launcher-redesign-1/r1-home-night-1280x800.png` ## Performance (`horizon-launcher benchmark --repeats 5`, Mac mini M4 Pro) The Mac mini was very loaded during these runs (load average 38–113), so the starts are noisy. Under the same load, main and this PR land in the same range: | Run | Load (1 min) | Cold start | Warm starts (mean) | RSS | Idle CPU | |---|---|---|---|---|---| | main | 38 | 319 ms | 180 ms | 159 MB | 8.8 % (one 41 % outlier) | | main | 113 | 853 ms | 785 ms | 160 MB | 8.0 % | | main | ~95 | 1074 ms | 1174 ms | – | – | | R1 | 81 | 1434 ms | 1181 ms | 161 MB | 0.7 % | | R1 | ~80 | 616 ms | 824 ms | – | – | Fonts loaded at start: 5 Bricolage + Geist Mono (was 3 Geist + Geist Mono + 3 Pixelify). The binary is 148 KB smaller. ## Self-check pr_ready ran on the stack top (this PR + R1b). Their tree is identical to what is pushed. R1 alone was checked again with `cargo clippy --all-targets -D warnings` on the launcher. ``` | Scope | ⚠️ 15 files, +927 −26 (R1 + R1b together; R1 alone: 14 files, +610 −25, of which 93 OFL text, 85 generated CSS, 55 docs) | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-theme | ✅ 9 passed | | tokens.css up to date | ✅ | | launcher rustfmt | ✅ | | launcher clippy | ✅ | | launcher tests | ✅ 254 passed | | Parity | ➖ 31 affected (horizon-theme is read by the game), to run in CI | ``` ## Ludovic's answers (2026-10-29) 1. Style approved. 2. Corners: pixel-cut. 3. Cyrillic: Geist. 4. The accent and muted tweaks accepted. Stays a draft until he has seen the next screenshots. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:17 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5109
No description provided.