[GH-ISSUE #1379] [chat] Legacy formatting codes are drawn as literal characters #403

Closed
opened 2026-11-02 15:38:50 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @rdbtCVS on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1379

Tested both explicit singleplayer modes at 83fa14e51b89eab728b8e233e9e5d95296bef93d on Linux/Vulkan.

Reproduce by emitting /tellraw @s {"text":"§cRED"} (a console/control command avoids the chat input's restriction on typing §). Compare Chat Colors ON and OFF.

Expected: ON displays red RED; OFF displays plain RED. Neither setting should draw §c. Native 26.3 parses legacy codes during text rendering and strips them during chat wrapping when colors are disabled.

Actual: both modes display literal §cRED in white, with either option value. Explicit JSON component colors are a separate case: native preserves them even with Chat Colors OFF, so that behavior is not reported as a bug.

Evidence: .local/singleplayer-audit/chat-e/colors-toggle-*/chat-colors-{0-true,1-false,2-true}.png, command traces and recorded applied option values. Native ComponentRenderUtils and StringDecomposer bytecode is archived under vanilla-bytecode/.

Hypothesis: chat wrapping/drawing bypasses legacy-code resolution used by other text surfaces.

Acceptance: legacy formatting renders without literal control codes and respects Chat Colors in both modes.

Originally created by @rdbtCVS on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1379 Tested both explicit singleplayer modes at `83fa14e51b89eab728b8e233e9e5d95296bef93d` on Linux/Vulkan. Reproduce by emitting `/tellraw @s {"text":"§cRED"}` (a console/control command avoids the chat input's restriction on typing §). Compare Chat Colors ON and OFF. Expected: ON displays red `RED`; OFF displays plain `RED`. Neither setting should draw `§c`. Native 26.3 parses legacy codes during text rendering and strips them during chat wrapping when colors are disabled. Actual: both modes display literal `§cRED` in white, with either option value. Explicit JSON component colors are a separate case: native preserves them even with Chat Colors OFF, so that behavior is not reported as a bug. Evidence: `.local/singleplayer-audit/chat-e/colors-toggle-*/chat-colors-{0-true,1-false,2-true}.png`, command traces and recorded applied option values. Native `ComponentRenderUtils` and `StringDecomposer` bytecode is archived under `vanilla-bytecode/`. Hypothesis: chat wrapping/drawing bypasses legacy-code resolution used by other text surfaces. Acceptance: legacy formatting renders without literal control codes and respects Chat Colors in both modes.
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#403
No description provided.