Skip to content

Cache system font probes independently of GPU rendering - #49

Merged
danwalmsley merged 1 commit into
mainfrom
codex/isolated-system-font-probe-cache
Sep 9, 2026
Merged

danwalmsley merged 1 commit into
mainfrom
codex/isolated-system-font-probe-cache

Conversation

@danwalmsley

Copy link
Copy Markdown
Collaborator

Repeated font-family checks currently call Skia's font lookup for each text preparation. Cache those positive and negative system-font probes using case-insensitive keys and a bounded 256-entry cache. Document and global web-font registrations are still checked first, so a cached missing system family cannot hide a newly registered web font.

Extracted from PR #43, commit 5547397. This PR contains only NativeTextShaping and its regression test. The cache targets the macOS system-UI metrics lookup; no separate Windows-specific optimization is introduced. The GPU-segment shaper reuse remains in #43 because its rendering path is not on main.

Validation on macOS: all 63 NativeTextShapingTests pass on .NET 8 and all 63 pass on .NET 10; git diff --check passes. The regression verifies case-insensitive cached misses, later document web-font registration, and isolation between documents. No independent performance percentage or Windows runtime qualification is claimed.

Extract the shared font lookup optimization and web-font precedence regression from PR #43, commit 5547397.
@danwalmsley
danwalmsley merged commit 1154c70 into main Sep 9, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant