fix(fps-counter): "FPS" is no longer cut off at the counter's right edge #3144

Merged
HumanBean merged 1 commit from HumanBean/Longshot:fix/fps-counter-width into main 2026-12-04 01:37:00 +00:00
Owner

Summary

The FPS counter could cut off the right side of "FPS", most visibly the S at the plain FPS level.

The counter's width is estimated before anything is drawn (plan, game/mods/fps-counter/src/counter.ts). At that
level the estimate came to 80 points with no room to spare, while bold "FPS" and its outline are wider than the
estimate's average letter, and a Canvas cuts what passes its edge. More room is now reserved for it.

Testing

Tested: nothing run, at the author's request.

Still to test:

  • Linux or Windows: set FPS counter to FPS in each corner and size; expect "FPS" whole (by hand).

Measurements

Nothing to measure: the counter's width.

Risks

The counter is a little wider (one 16-point step at the FPS level), so in a right-hand corner the number sits where it
did and the box reaches further left. A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (not run, at the author's request)
  • mise run test passes (any failure that also fails on main is named). (not run)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here. (none added)
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ

## Summary The FPS counter could cut off the right side of "FPS", most visibly the S at the plain **FPS** level. The counter's width is estimated before anything is drawn (`plan`, `game/mods/fps-counter/src/counter.ts`). At that level the estimate came to 80 points with no room to spare, while bold "FPS" and its outline are wider than the estimate's average letter, and a Canvas cuts what passes its edge. More room is now reserved for it. ## Testing **Tested:** nothing run, at the author's request. **Still to test:** - Linux or Windows: set **FPS counter** to **FPS** in each corner and size; expect "FPS" whole (by hand). ## Measurements Nothing to measure: the counter's width. ## Risks The counter is a little wider (one 16-point step at the FPS level), so in a right-hand corner the number sits where it did and the box reaches further left. A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. (not run, at the author's request) - [ ] `mise run test` passes (any failure that also fails on `main` is named). (not run) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [ ] A fix: a game-free test that fails on `main` and passes here. (none added) - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
fix(fps-counter): "FPS" is no longer cut off at the counter's right edge
Some checks failed
CI / What the change needs (pull_request) Successful in 6s
PR description / Title and description (pull_request_target) Failing after 5s
CI / Third-party parts and guide screenshots (pull_request) Successful in 10s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 16s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m21s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 22m4s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 16m22s
CI / Website build and checks (pull_request) Successful in 1m28s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 14m57s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 51m18s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m6s
6935a94202
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
HumanBean changed title from WIP: fix(fps-counter): "FPS" is no longer cut off at the counter's right edge to fix(fps-counter): "FPS" is no longer cut off at the counter's right edge 2026-12-04 01:36:54 +00:00
HumanBean deleted branch fix/fps-counter-width 2026-12-04 01:37:01 +00:00
Sign in to join this conversation.
No reviewers
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
MagicBeanDev/Longshot!3144
No description provided.