* 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
A package or global string pool that is outside its payload or fails to
parse, and a simple entry whose value runs past its chunk, now set
Table::truncated as well, so names and values that were not read are
not taken for absent ones.
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
Detail's radii, regularisation and weights were resolved inside the
private detail(), and per_pixel() returned None whenever Detail was on,
so another implementation (PhotoCraft's GPU preview) could not run it
without copying that resolution.
- spatial::Detail::new(p, inputs) with LuminanceNoise, ColorNoise and
Sharpen; detail() now runs from a Detail. develop() is unchanged.
- PerPixel.detail; per_pixel() no longer refuses Detail (it still
refuses Calibration).
- spatial_tone(p): the spatial stages before Whites and Blacks. Detail
comes after them, so white_black_points() still measures when Detail
is the only spatial stage.
Stop the entry loop with break instead of return, so entries skipped
before the limit still get their warning.
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
Every path that drops a package, a type chunk or entries now sets
Table::truncated, and entries running past their chunk get a warning
instead of being skipped silently. Consumers use truncated to tell a
resource that is absent from one that was not read.
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
hayro-interpret is excluded from the workspace, so editing
vendor/hayro-interpret/src/context.rs failed the Linux lint leg's
diff-mode unreached-rs check. Those backends compile in
scripts/test-pdf-backends.sh, not as workspace members.
The first commit had run rustfmt with the workspace max_width on the
whole vendored file. This keeps only the patch 89 behaviour change and
the regression tests.
Patch 89 still skips a form already on the drawing stack (ISO 32000-2
§8.10.1). Reporting that skip as InterpreterWarning::ContentTruncated
made VectorCraft reject legitimate knockout-mask PDFs after the #2472
pin, because a soft mask may paint a form already being drawn. The skip
stays; the truncation flag does not.
Refs storytold/craft-libs#778.
A PICT inside another metafile now draws on that file's decode budget
instead of resetting it. The public PICT entry point still starts a
fresh budget.
* metafile: expose frame and source-unit facts (#788)
Adapt the VectorCraft WMF unit scanner and EMF header-scale source facts from current VectorCraft main (db9acab4), preserving original authorship. Keep physical fallback scales and picture interpretation in the consumer.
* Distinguish EMF fixed calibration from variable header data
Retain the current app sizing policy. Correct the shared header classification when a description or pixel descriptor starts before the micrometre fields; this intentionally differs from the former size-only interpretation for those files.
* Use fixed-size chunks in the EMF header regression
* Reject negative EMF micrometre dimensions
ENHMETAHEADER stores szlMicrometers as signed SIZEL. Fall back to positive millimetre dimensions when either micrometre axis is nonpositive.
---------
Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>