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