From ed626f425011e5d8ad5e2a1e5249e413d2c5d48f Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 26 Jun 2026 10:54:16 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20file=20#150=20=E2=80=94=20thread=20Fix?= =?UTF-8?q?=20C=20per-element=20dat-font=20resolver=20into=20GameWindow's?= =?UTF-8?q?=204=20import=20sites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to Fix C (a0d3395): the per-element FontDid resolver is studio-only; GameWindow passes null. Captured the turnkey fix (ConcurrentDictionary + GetOrAdd closure over UiDatFont.Load, mirroring RenderStack.ResolveDatFont) + the 4 import sites + the CharacterStatController auto-benefit note. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/ISSUES.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/ISSUES.md b/docs/ISSUES.md index 240de6d4..4e46d9b6 100644 --- a/docs/ISSUES.md +++ b/docs/ISSUES.md @@ -46,6 +46,27 @@ Copy this block when adding a new issue: --- +## #150 — Live game (GameWindow) doesn't thread the per-element dat-font resolver (Fix C is studio-only) + +**Status:** OPEN +**Severity:** LOW +**Filed:** 2026-06-26 +**Component:** ui + +**Description:** Fix C (commit `a0d3395`) added a per-element dat `FontDid` resolver to `LayoutImporter.Import` + `DatWidgetFactory` — each text element gets ITS OWN dat font instead of one global font. It's wired into the STUDIO path (StudioWindow → LayoutSource → LayoutImporter), but GameWindow's four `LayoutImporter.Import`/`Build` calls explicitly pass `null`, so the LIVE game still uses a single global font and panels don't get per-element dat fonts. + +**Fix:** Build a `Func` closure over a `ConcurrentDictionary` near where `vitalsDatFont`/`largeDatFont` load (~`GameWindow.cs:1820`), reusing `UiDatFont.Load` for any unknown id via `GetOrAdd` (same pattern as `RenderStack.ResolveDatFont`), and pass it to each of the four Import sites: +- vitals `0x2100006C` — ~`GameWindow.cs:1820-1835` +- chat — ~`GameWindow.cs:1875` +- toolbar `0x21000016` — ~`GameWindow.cs:2019` +- inventory `0x21000023` — ~`GameWindow.cs:2157` + +**Note:** `CharacterStatController.Bind` (also called from GameWindow) already has the null-means-keep-dat-font semantics from Fix C, so it benefits automatically once GameWindow threads the resolver. Backward-compat: the resolver applies the dat font as a *default*; controllers that set `DatFont` explicitly still override, so existing live-game panels stay unchanged. + +**Files:** `src/AcDream.App/Rendering/GameWindow.cs` (4 import sites), `src/AcDream.App/Rendering/RenderBootstrap.cs` (`RenderStack.ResolveDatFont` = the pattern to mirror). + +**Relates to:** Fix C `a0d3395` (studio-path resolver); the importer dat-fidelity work (Fix A/B/C, this session). + ## #149 — Studio: inventory window (0x21000023) renders all-black in preview **Status:** OPEN