Skip to content

feat: surface missed fonts from workers and sync session bookkeeping - #60

Merged
mlightcad merged 1 commit into
mainfrom
feat/missed-fonts-worker-sync
Sep 7, 2026
Merged

mlightcad merged 1 commit into
mainfrom
feat/missed-fonts-worker-sync

Conversation

@mlightcad

Copy link
Copy Markdown
Owner

Summary

  • Record and dispatch fontNotFound from findAndReplaceFont (including mapped replacements) so hosts can show missing-font UI, and forward worker fontNotFound / clear on fontLoaded to the main-thread FontManager.
  • Add replaceMissedFonts / clearMissedFonts across FontManager, WebWorkerRenderer, and UnifiedRenderer; worker-mode adopts the intersection of worker-filtered maps so already-loaded faces do not linger as false misses.
  • Clear missed-font entries case-insensitively when a face loads, matching CAD style name casing vs lowercase loaded face names.

Test plan

  • vitest run for fontManager, lazyFontLoading, and render-remote-font-loading tests
  • Manually open a drawing with a missing style font in worker mode and confirm status-bar / fontNotFound fires once, then clears after lazy load
  • Call replaceMissedFonts / clearMissedFonts with a worker pool and confirm main missedFonts matches worker-filtered state

@mlightcad mlightcad self-assigned this Sep 7, 2026
@mlightcad mlightcad added the enhancement New feature or request label Sep 7, 2026
…in sync

Report fontNotFound from findAndReplaceFont and forward worker misses to the main thread so hosts can drive missing-font UI, while replaceMissedFonts adopts the intersection of worker-filtered maps to avoid stale entries in worker-only mode.
@mlightcad
mlightcad force-pushed the feat/missed-fonts-worker-sync branch from 14a9f7d to b146a3a Compare September 7, 2026 10:03
@mlightcad
mlightcad merged commit f7e7b69 into main Sep 7, 2026
2 checks passed
@mlightcad
mlightcad deleted the feat/missed-fonts-worker-sync branch September 7, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant