mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-01 22:07:28 -06:00
Session::apply_prefs set the shared text engine's missing-glyph protection through photocraft_text::shared(), which blocks until the system font scan that launch starts in the background is done. It runs on the UI thread at launch and on every preferences change, so the first frame waited for the rest of the scan: 248–257 ms on this machine (release, launch order replayed), more with many fonts installed. set_shared_missing_glyph_protection applies it at once when the engine is built, and otherwise from one helper thread once the scan finishes. Both read the newest setting under the engine's lock, so a late change is never overwritten by an older one. Measured the same way: 0.1 ms. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>