[PR #2029] [MERGED] Subtitles: measure each line once per frame #3953

Closed
opened 2026-11-03 04:13:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: perf/subtitle-width-once


📝 Commits (2)

  • 9dc72bf Subtitles: measure each line once per frame
  • c2d137e Merge remote-tracking branch 'origin/main' into perf/subtitle-width-once

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/hud_overlays.rs (+4 -4)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

SubtitleOverlay.extract built each audible subtitle's Text::translate twice per frame: once to measure the box width, and again to draw it. The width the first pass already computed is now carried into the row loop, so the second Text and its glyph-width walk are gone.

The carried value is the one that produced the widest box, so the box sizes and the row stacking are unchanged.

The pr_ready --quick block follows as a comment.


🔄 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/2029 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/subtitle-width-once` --- ### 📝 Commits (2) - [`9dc72bf`](https://github.com/horizon-rust/horizon/commit/9dc72bf3ac6f7eed7c2667953f0ddd84e12c0cad) Subtitles: measure each line once per frame - [`c2d137e`](https://github.com/horizon-rust/horizon/commit/c2d137ed06e82dfe56476348ffec55a6a5f3aa31) Merge remote-tracking branch 'origin/main' into perf/subtitle-width-once ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/hud_overlays.rs` (+4 -4) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. `SubtitleOverlay.extract` built each audible subtitle's `Text::translate` twice per frame: once to measure the box width, and again to draw it. The width the first pass already computed is now carried into the row loop, so the second `Text` and its glyph-width walk are gone. The carried value is the one that produced the widest box, so the box sizes and the row stacking are unchanged. The `pr_ready --quick` block follows as a comment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:33 +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#3953
No description provided.