Skip to content

Fix standalone Unit Frames font cache on startup - #1981

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/standalone-uf-font-cold-start
Sep 7, 2026
Merged

Fix standalone Unit Frames font cache on startup#1981
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/standalone-uf-font-cold-start

Conversation

@dfrisone

@dfrisone dfrisone commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes a standalone startup path that can leave Unit Frames using Expressway even when the saved global font is Friz Quadrata TT.

Standalone runtime files can call GetFontPath before the addon's SavedVariables load, caching the temporary default. Invalidate that cache in the existing standalone ADDON_LOADED branch, after database rerooting and before queued initialization. Frame initialization then resolves the saved font choice.

Five lines in EllesmereUI_Lite.lua. The full-suite path is unchanged. One startup invalidation; no new timers, event registrations, frames, or per-frame work.

How was it tested?

  • A local Lua harness using font-resolution and Unit Frames cache functions extracted from installed standalone v9.1.6 reproduced the stale Expressway path before the fix. The saved Friz font and module-override cases pass with the fix.
  • Expressway defaults and the full-suite path pass before and after the change.
  • EUI diff-scoped and staged style checks pass; git diff --check passes.
  • Syntax checked with the available Lua 5.4 luac; the added code uses only Lua 5.1 syntax.
  • Applied the equivalent change to installed standalone v9.1.6. The PR author tested it in game on the retail client and confirmed the fix works. Exact client build was not recorded.

Additional reproduction/regression checklist (individual steps not separately recorded): select Friz Quadrata TT, fully exit and relaunch WoW, then inspect target/focus text and target castbar before /reload. Repeat with Expressway and a Unit Frames font override; verify /reload preserves the selection.

Screenshots

Before/after screenshots are not available. This restores the selected font; it adds no new UI.

Checklist

  • New settings default OFF (no behavior change without opt-in) - N/A: bug fix, no new settings.
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built - no new registrations, polling, hooks, or frames; invalidation is confined to standalone startup.
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) - one invalidation in the existing addon-load handler.
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames - N/A: only the addon's font cache is invalidated.
  • Tested in-game on live; no version gates or pre-Midnight APIs added - PR author confirmed the fix works in game on retail; exact client build not recorded. No version gates or APIs added.

Cat gives the font fix a thumbs up

@EllesmereGaming
EllesmereGaming merged commit 8239cde into EllesmereGaming:main Sep 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants