prompts: add Wine/Proton GDI font fallbacks and F1–F12/nav keycap labels #143

Manually merged
github merged 1 commit from github-bot/gh-143 into main 2026-12-05 20:45:47 +00:00 AGit
Owner

@⁠greedtv92 on GitHub · 2026-12-05 19:42 UTC · original
greedtv92:feat/prompts-wine-fonts-and-keys → main · +52 −6 · 2 files · 1 commits · merged 2026-12-05 20:42 UTC

Split out of #113 (Part 1 of 3 — Prompts) per review feedback. Small, zero-risk addition to larp-game::prompts on top of #109:

Changes (+52 / -6)

  • Wine / Proton font fallbacks (crates/larp-game/src/prompts/font.rs): probes GDI faces via GetTextFaceW in order (Segoe UI -> Tahoma for letters; Segoe UI Symbol -> DejaVu Sans -> MS Gothic for arrow/Enter/Backspace signs), ported from Darner (tyr0nsur/Darner, GPL-3.0-or-later). Prevents missing/broken prompt glyphs on Linux/Proton where Segoe faces are absent.
  • Extended keycap labels (crates/larp-game/src/prompts.rs): adds labels for Caps, PgUp, PgDn, End, Home, Ins, Del, and F1–F12 so custom controls.ini bindings to those keys render keycaps instead of falling back to stock Xbox icons.

Verification

  • cargo test -p larp-game --lib prompts — 60/60 passed (both Keyboard KeyCaps and PlayStation symbol suites), 0 warnings.
  • Leaves all input paths and default LARP_PROMPTS behavior completely untouched.
**@⁠greedtv92** on GitHub · 2026-12-05 19:42 UTC · [original](https://github.com/gamingwithhomie/larp/pull/143) `greedtv92:feat/prompts-wine-fonts-and-keys` → `main` · +52 −6 · 2 files · 1 commits · merged 2026-12-05 20:42 UTC Split out of #113 (Part 1 of 3 — Prompts) per review feedback. Small, zero-risk addition to `larp-game::prompts` on top of #109: ### Changes (+52 / -6) - **Wine / Proton font fallbacks (`crates/larp-game/src/prompts/font.rs`):** probes GDI faces via `GetTextFaceW` in order (`Segoe UI` -> `Tahoma` for letters; `Segoe UI Symbol` -> `DejaVu Sans` -> `MS Gothic` for arrow/Enter/Backspace signs), ported from Darner (`tyr0nsur/Darner`, GPL-3.0-or-later). Prevents missing/broken prompt glyphs on Linux/Proton where Segoe faces are absent. - **Extended keycap labels (`crates/larp-game/src/prompts.rs`):** adds labels for `Caps`, `PgUp`, `PgDn`, `End`, `Home`, `Ins`, `Del`, and `F1`–`F12` so custom `controls.ini` bindings to those keys render keycaps instead of falling back to stock Xbox icons. ### Verification - `cargo test -p larp-game --lib prompts` — **60/60 passed** (both Keyboard KeyCaps and PlayStation symbol suites), 0 warnings. - Leaves all input paths and default `LARP_PROMPTS` behavior completely untouched.
- Add Wine/Proton GDI font fallback order (Segoe UI -> Tahoma; Segoe UI
  Symbol -> DejaVu Sans -> MS Gothic) via GetTextFaceW so keycap glyphs
  render cleanly on Linux/Proton (ported from Darner, GPL-3.0-or-later).
- Add keycap labels for Caps, PgUp, PgDn, End, Home, Ins, Del, and F1-F12
  so controls.ini bindings to those keys render as keycaps instead of
  falling back to Xbox icons.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 19:43:36 +00:00
github-bot referenced this pull request from a commit 2026-12-05 20:45:11 +00:00
github manually merged commit c17503957f into main 2026-12-05 20:45:47 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.