[PR #1077] [MERGED] fix(hud): Apply legacy formatting codes to action bar and titles #3028

Closed
opened 2026-11-02 16:00:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/hud-legacy-formatting


📝 Commits (1)

  • 41c4caa fix(hud): apply legacy formatting codes to action bar and titles

📊 Changes

2 files changed (+15 additions, -17 deletions)

View changed files

📝 crates/horizon-client/src/hud_overlays.rs (+12 -16)
📝 tools/hud_parity_cases.py (+3 -1)

📄 Description

Summary

Server components can carry legacy formatting codes inside their text. Vanilla's font applies them to every literal through StringDecomposer, but the action bar, title, subtitle and boss bar name paths drew the component as-is, so §8 and friends appeared as glyphs. The scoreboard sidebar had the same problem and was fixed the same way in #1003.

Changes

hud_overlays.rs resolves legacy codes before measuring and drawing the action bar message, title, subtitle and boss bar name.

tools/hud_parity_cases.py adds two legacy-coded strings to TITLES, one matching a server action bar such as §8[§fAny questions? §8] §e§l/support en.

Vanilla reference

StringDecomposer.iterateFormatted and ChatFormatting.getByCode, which the existing Text::resolve_legacy already implements; the sidebar fix in #1003 used the same call. No new vanilla behavior is introduced, only applied where it was missing.

Test plan

cargo fmt -p horizon-client -- --check
python3 tools/test_hud_parity.py --kind title --count 6
python3 tools/test_hud_parity.py --kind boss --count 4

All pass: 6/6 title states and 4/4 boss states, with zero oracle errors. In a real world, /title @s actionbar with the codes above renders gray brackets, white question text and yellow bold /support en, with no section signs.

Generated with Cairn Code · DeepSeek V4.1 Flash


🔄 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/1077 **Author:** [@ItsPotatoTime](https://github.com/ItsPotatoTime) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/hud-legacy-formatting` --- ### 📝 Commits (1) - [`41c4caa`](https://github.com/horizon-rust/horizon/commit/41c4caac25af843493d73c6cd0d142a29ea56457) fix(hud): apply legacy formatting codes to action bar and titles ### 📊 Changes **2 files changed** (+15 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/hud_overlays.rs` (+12 -16) 📝 `tools/hud_parity_cases.py` (+3 -1) </details> ### 📄 Description ## Summary Server components can carry legacy formatting codes inside their text. Vanilla's font applies them to every literal through `StringDecomposer`, but the action bar, title, subtitle and boss bar name paths drew the component as-is, so `§8` and friends appeared as glyphs. The scoreboard sidebar had the same problem and was fixed the same way in #1003. ## Changes `hud_overlays.rs` resolves legacy codes before measuring and drawing the action bar message, title, subtitle and boss bar name. `tools/hud_parity_cases.py` adds two legacy-coded strings to `TITLES`, one matching a server action bar such as `§8[§fAny questions? §8] §e§l/support en`. ## Vanilla reference `StringDecomposer.iterateFormatted` and `ChatFormatting.getByCode`, which the existing `Text::resolve_legacy` already implements; the sidebar fix in #1003 used the same call. No new vanilla behavior is introduced, only applied where it was missing. ## Test plan ``` cargo fmt -p horizon-client -- --check python3 tools/test_hud_parity.py --kind title --count 6 python3 tools/test_hud_parity.py --kind boss --count 4 ``` All pass: 6/6 title states and 4/4 boss states, with zero oracle errors. In a real world, `/title @s actionbar` with the codes above renders gray brackets, white question text and yellow bold `/support en`, with no section signs. Generated with Cairn Code · DeepSeek V4.1 Flash --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:00:55 +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#3028
No description provided.