Skip to content

fix: avoid retaining resized font chains - #324

Open
Happypig375 wants to merge 3 commits into
issue-293-font-startup-benchmarkfrom
issue-107-font-retention
Open

fix: avoid retaining resized font chains#324
Happypig375 wants to merge 3 commits into
issue-293-font-startup-benchmarkfrom
issue-107-font-retention

Conversation

@Happypig375

Copy link
Copy Markdown
Collaborator

Summary

  • snapshot caller-provided local typefaces once and expose a stable read-only view
  • resize painters from the local-only snapshot so repeated FontSize changes no longer feed global faces back into a growing Fonts chain
  • exercise repeated same-painter local-face and size switching in the reproducible profiler from perf: add reproducible font startup profiler #317
  • cover single-use enumerables, defensive snapshots, stable face order/count, repeated resizing and switching, and a real Comic Neue custom face

Validation

  • Release builds passed for Rendering.Tests and Rendering.Benchmarks
  • CSharpMath.Rendering.Tests.TestFonts: 5 passed
  • low-iteration font-profile smoke: 10 scenarios, no errors
  • both switching scenarios exercised the same MathPainter across all four faces and reported retained-after-GC evidence
  • scoped format checks and git diff checks passed

This is stacked on #317 because it extends that profiler. It addresses the unbounded resize/switching retention component of #107; deeper extraction of renderer-ready bundled-font data remains separated under #191.

Progress on #107

@Happypig375 Happypig375 added Type/Enhancement A concrete change to CSharpMath behavior or capability. Area/Rendering Typesetting, measurement, fonts, text layout, and drawing. labels Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area/Rendering Typesetting, measurement, fonts, text layout, and drawing. Type/Enhancement A concrete change to CSharpMath behavior or capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant