feat(chat): retail text style — two-plane glyph outlines, authored SpewBox/chat styles

Campaign CH round 4, user-gate items 1+2. Root cause: retail ships a
second (background) glyph atlas per font, dilated 2px on every side,
plus two border-pixel scalars (Font.NumHorizontalBorderPixels/
NumVerticalBorderPixels) that acdream's font reader never read — so
even the pre-existing outline parameter drew almost nothing once
enabled. Landed together (either half alone is a no-op or a
regression):

- UiDatFont carries BorderX/BorderY from the DAT font resource.
- UiRenderContext.DrawStringDat inflates the background blit's source
  and destination rect by that margin and restructures into retail's
  exact two-pass whole-string outline-then-fill model
  (UIElement_Text::DrawSelf), plus the 8-neighbour +-1px fallback for
  fonts with no background atlas. Corrects the stale "property 0xd"
  comment to the real ids, 0x21 (Outline) / 0x22 (OutlineColor).
- LayoutDesc property 0x21/0x22 import (ElementInfo.Outline/
  OutlineColor, LayoutImporter.ReadState, ElementReader.Merge/
  ApplyCanonicalLegacyProjection, DatWidgetFactory.BuildText) so every
  authored-outline element across the DAT set is correct at once.
- SpewBox: RetailFontId corrected from a round-3 heuristic
  (0x40000025) to the actually-authored 0x40000001 (18px bold serif),
  Outline=true set on the controller's UiText. Fill colour stays the
  user-gate-round-1-pinned yellow — font atlases are alpha-only
  (PFID_A8), so there is no baked shading that could explain the
  screenshot's gold as anything other than the outline itself.
- Chat transcript: default fill now seeds from its authored
  ARGB(255,204,204,204) instead of an unrelated color-table slot
  (ChatTranscriptRenderer.BuildLines takes the transcript's own
  DefaultColor as a parameter); the 34-entry LogTextType table is
  untouched, and every existing CH1 conformance test stays green
  unmodified.

Regenerated the committed chat_2100006f.json fixture from the real
installed DAT, confirming end to end (not by missing-field default)
that the transcript carries no outline.

Tests: font-reader border fields + inflation math pinned against the
real DAT font, two-pass draw ordering/tint/inflation via a new
TextRenderer.DebugSpriteSegmentVerts test seam, property 0x21/0x22
import at both the ElementReader.Merge and StateDesc-property layers,
SpewBox font/outline, and the chat default-shade seed with the color
table proven untouched.

Full Release suite: 12,610 passed / 4 skipped / 0 failed
(AcDream.slnx, complete solution).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-10 19:28:34 +02:00
parent 5b54387b8e
commit bcc34ee301
22 changed files with 1995 additions and 105 deletions

View file

@ -200,6 +200,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {},
"StateCursors": {},
"DefaultStateName": "",
@ -604,6 +606,8 @@
"Z": 1,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100688408,
@ -685,6 +689,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693183,
@ -1095,6 +1101,8 @@
"Z": 1,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100688408,
@ -1176,6 +1184,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693188,
@ -1253,6 +1263,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693184,
@ -1336,6 +1348,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Maximized": {
"Item1": 100687460,
@ -1417,6 +1431,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693189,
@ -1494,6 +1510,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693185,
@ -1571,6 +1589,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693190,
@ -1648,6 +1668,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693186,
@ -1759,6 +1781,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688169,
@ -1818,6 +1842,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688170,
@ -1936,6 +1962,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688169,
@ -2025,6 +2053,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688171,
@ -2079,6 +2109,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100682946,
@ -3051,6 +3083,8 @@
"Z": 0.8,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {},
"StateCursors": {},
"DefaultStateName": "",
@ -3218,6 +3252,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100687630,
@ -3446,6 +3482,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100682847,
@ -3552,6 +3590,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {},
"StateCursors": {},
"DefaultStateName": "Normal",
@ -3632,6 +3672,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100682848,
@ -3726,6 +3768,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100682851,
@ -3820,6 +3864,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100682854,
@ -4033,6 +4079,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100682857,
@ -4244,6 +4292,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100682860,
@ -4367,6 +4417,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688169,
@ -4456,6 +4508,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688172,
@ -4574,6 +4628,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688169,
@ -4658,6 +4714,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100667706,
@ -4933,6 +4991,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100683109,
@ -5320,6 +5380,8 @@
"Z": 1,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {},
"StateCursors": {},
"DefaultStateName": "",
@ -6304,6 +6366,8 @@
"Z": 1,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal_focussed": {
"Item1": 100667819,
@ -6361,6 +6425,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal_focussed": {
"Item1": 100683111,
@ -6419,6 +6485,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal_focussed": {
"Item1": 100683111,
@ -6776,6 +6844,8 @@
"Z": 1,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100669717,
@ -6868,6 +6938,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100688173,
@ -7285,6 +7357,8 @@
"Z": 1,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100688408,
@ -7699,6 +7773,8 @@
"Z": 1,
"W": 1
},
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"Normal": {
"Item1": 100688408,
@ -7780,6 +7856,8 @@
"HJustify": 1,
"VJustify": 1,
"FontColor": null,
"Outline": false,
"OutlineColor": null,
"StateMedia": {
"": {
"Item1": 100693187,