mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 12:32:10 +01:00
* font-store: index format 1.2 and the preview service as a download mirror Reads index format 1.2 and pins craft-font-index 995ef20. An optional font preview service (CRAFT_FONT_PREVIEW_URL, else the preview_service setting) serves installs and licence texts by sha256 before the index's URLs; a service that fails on the network is skipped for a minute, per origin, by every clone of the client. Settings gain the previews switch. * font-manager: previews from the font preview service A preview client (remote.rs) fetches WOFF2 subsets of each face from the service on its own worker threads, highest priority first, with a shared disk cache. The Browse list shows each family in its own face; the detail view shows variable faces with their axes and named instances, and the family's licence and NOTICE texts. Without a service, or with previews switched off, the panel works as before. * font-store: a host default for the preview service FontStore::with_default_preview_service (and SuiteStore's) names the service used while neither CRAFT_FONT_PREVIEW_URL nor the user's setting names one. It is never written to settings.json, so clearing the setting brings it back and other apps sharing the store don't see it. PreviewServiceSource gains Default. * font-manager: box the installed face in a card's Face, so the enum stays small on Windows * font-store: a host default for the network setting FontStore::with_default_network (and SuiteStore's) gives the setting the host uses while the user hasn't chosen. settings.json saves network only once the user chooses, and never the host's default; an agent's store ignores it. Files from before could hold "off" without a choice, and that "off" still counts as the user's. * font-store: per-source samples in merges, mirror only for curated families, an unreadable settings file fails closed Index::merge keeps each source's own sample map, so a source left out as a duplicate brings no samples, also from inside an index merged before. Installs and legal_text ask the preview service only for curated families: it holds only the built-in sources' files, and asking for a user source's file would send it the file's hash. A missing settings.json is no choice, so the host's defaults apply. One that exists but can't be read, is too large or doesn't parse reads as network off and no preview service, not even the host's default; a write over it starts from those values. * font-manager: review fixes for the preview service - Preview is offered for a family whose subsets failed, in its card and its details sheet. - Licence and NOTICE texts are kept by the file's sha256 too, so a refreshed index never shows the old text. - Axis sliders keep only the user's edits; an untouched axis follows the subset's default. The readout shows up to two decimals. - The detail view asks for the sample subset also when the typed text has too many characters for a request of its own. - The typing pause is measured after the toolbar has handled input. - A failed subset schedules a repaint for its retry. - DiskCache::contains asks the folder, so a file another app cached later is found. - Installer docs name the host's default preview service. - The fake service in the flow tests drops a request cancelled while held. * Fonts panel: notice when the preview server can't be reached; opt-in sans-serif and system-language default filters