Conversation
moWerk
marked this pull request as draft
August 6, 2026 19:35
Extend WatchfaceReloader to also watch the user font folder and load each font it finds with QFontDatabase::addApplicationFont(), so a face installed by the store renders with its bundled family immediately, with no fc-cache run and no session restart. Fonts already on disk are registered at startup too: they exist only in the user folder, and fontconfig knows them only after an fc-cache run nothing guarantees has happened (a freshly flashed device never ran one), so recording them without registering would leave every store face on fallback fonts after a session restart. Changes are routed by folder. A watchface change drops the component cache and reloads, as before; font-folder churn no longer triggers that teardown, and a watchface install no longer pays a font scan. The registry keys path to font id with size and mtime, so a file replaced in place re-registers, a vanished file releases its database entry, and a file that repeatedly fails to load stops being retried once its attempt budget is spent. A short settle re-scan remains for external writers (adb, scp) whose in-place writes can be caught mid-file; store installs write atomically and never need it.
moWerk
force-pushed
the
watchface-cache-reload
branch
from
August 6, 2026 23:01
6c3ad83 to
8144d9d
Compare
moWerk
marked this pull request as ready for review
August 8, 2026 20:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Registers a watchface's bundled fonts into the running launcher at runtime, so a face installed by the store renders with its bundled family immediately — no fc-cache run, no session restart.
Fonts already in the user font folder are registered at startup too: they exist only there, and fontconfig knows them only after an fc-cache run that nothing guarantees has happened (a freshly flashed device never ran one), so store faces would otherwise render with fallback fonts after any session restart. Folder changes are routed: a watchface change drops the QML component cache and reloads, as before, while font-folder churn no longer tears down the active face and a watchface install no longer pays a font scan. The registry tracks path, font id, size and mtime, so a font replaced in place re-registers, a removed face's font releases its database entry, and a file that repeatedly fails to load stops being retried once its attempt budget is spent. A short settle re-scan covers external writers (adb, scp) whose in-place writes can be caught mid-file; store installs write atomically and never need it.
Part of the watchface store set (AsteroidOS/unofficial-watchfaces#44); asteroid-settings#145 builds on this.
This was executed by an LLM under my direction. I have fully understood and take authorship of the changes.