Commit Graph
4278 Commits
Author SHA1 Message Date
FredApps 042dccd075 android-res: bound retained values and report UTF-8 recovery omissions 2026-11-23 09:39:20 +01:00
aiongg eeb5b26198 font-manager: previews from the font preview service; font-store downloads through it (#2782)
* 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
2026-11-23 01:32:41 -05:00
FredApps cdee9b8ab6 Merge pull request #3152 from FredApps/fix/3151-android-res-partial-table
android-res: mark the table partial when ARSC chunks or entries are skipped
2026-11-23 11:19:06 +07:00
FredApps a1be794fec android-res: mark the table partial when library records are omitted
Library records past their chunk or beyond the 256-record cap are not
read, so the table is partial.

Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-23 11:07:32 +07:00
FredApps f6b339e020 android-res: mark the table partial when a string pool or value is unreadable
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>
2026-11-23 04:54:08 +01:00
FredApps fff4a3b020 Merge branch 'main' into fix/3151-android-res-partial-table
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-23 04:53:08 +01:00
p0rps b2d2a1e948 develop: expose Camera Raw Detail's resolved parameters (#3097) (#3101)
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.
2026-11-22 22:47:52 -05:00
FredApps f812d2f59c android-res: report skipped entries when the entry limit stops a type
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>
2026-11-23 04:43:36 +01:00
FredApps b012adb0f0 android-res: mark the table partial when ARSC chunks or entries are skipped
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>
2026-11-23 04:33:04 +01:00
FredApps 205042e406 Merge pull request #3136 from FredApps/fix/778-form-self-draw-not-truncated
hayro-interpret: a form that draws itself is not content-truncated
2026-11-23 09:52:04 +07:00
FredApps c6452d95ee ci: allow excluded vendor trees in the unreached-rs check
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.
2026-11-23 08:59:12 +07:00
FredApps d69bdaf0b3 style: drop rustfmt churn on the rest of context.rs
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.
2026-11-23 08:52:26 +07:00
FredApps 9fcd7ea22d hayro-interpret: a form that draws itself is not content-truncated
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.
2026-11-23 08:51:58 +07:00
FredApps b9c7b69703 Merge pull request #3077 from storytold/feat/778-shared-android-resources
Share APK and Android resource readers for Craft Anything desktop
2026-11-23 07:48:57 +07:00
FredApps 8f4506133c Merge branch 'main' into feat/778-shared-android-resources 2026-11-23 06:55:12 +07:00
FredApps 8f6ad14b58 Merge pull request #3073 from ruchirguitar/feat/pict-reader
craft-metafile: add QuickDraw PICT v1/v2 reader
2026-11-23 06:54:50 +07:00
FredApps 6d8d6b7359 Merge branch 'main' into feat/778-shared-android-resources 2026-11-23 06:47:13 +07:00
FredApps b54e18f21d Merge branch 'main' into feat/pict-reader 2026-11-23 06:47:08 +07:00
FredApps 2be967ec51 Merge pull request #3042 from AlexChambers/develop-wb-demosaic-clip-mask
craft-develop: demosaic white-balanced mosaics with a clip mask
2026-11-23 06:46:46 +07:00
FredApps 931d648681 Merge branch 'main' into feat/pict-reader
# Conflicts:
#	crates/metafile/src/lib.rs
2026-11-23 06:37:07 +07:00
FredApps e8c7fc2b23 Merge branch 'main' into feat/778-shared-android-resources 2026-11-23 06:36:29 +07:00
FredApps bc0b26c460 Merge branch 'main' into develop-wb-demosaic-clip-mask 2026-11-23 06:36:24 +07:00
FredApps c6edabc220 Merge pull request #2825 from so-sai/feat/metafile-embedded-emf
craft-metafile: reassemble embedded EMF from WMF META_ESCAPE_ENHANCED_METAFILE (#2519)
2026-11-23 06:35:57 +07:00
FredApps 9cf333733f Merge branch 'main' into feat/778-shared-android-resources 2026-11-23 06:25:27 +07:00
FredApps 3b87adcf34 Merge branch 'main' into feat/pict-reader 2026-11-23 06:25:22 +07:00
FredApps f89862b8a5 Merge branch 'main' into feat/metafile-embedded-emf 2026-11-23 06:25:17 +07:00
FredApps 5dee4157bf Merge branch 'main' into develop-wb-demosaic-clip-mask 2026-11-23 06:25:11 +07:00
FredApps 369eb60baa Merge pull request #3059 from dotCooCoo/feat/cdr-preview
craft-cdr: read the picture a .cdr file keeps of its drawing
2026-11-23 06:24:49 +07:00
Alex Chambers d143c8013c craft-develop: retain same-colour clipping dependencies 2026-11-23 00:21:53 +01:00
FredApps 77807fd1be craft-metafile: keep the outer file's decode budget for a nested PICT
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.
2026-11-23 05:58:16 +07:00
FredApps e82ff5b8e0 Merge branch 'main' into feat/778-shared-android-resources 2026-11-23 05:54:27 +07:00
FredApps 5153451938 Merge branch 'main' into feat/pict-reader 2026-11-23 05:54:22 +07:00
FredApps 01e08770ef Merge branch 'main' into feat/metafile-embedded-emf 2026-11-23 05:54:17 +07:00
FredApps 3dbaa278d9 Merge branch 'main' into develop-wb-demosaic-clip-mask 2026-11-23 05:54:11 +07:00
FredApps 32e944076d Merge branch 'main' into feat/cdr-preview 2026-11-23 05:54:05 +07:00
Dylan M. TaylorandDylanMTaylor 33be35625e develop: wrap negative Camera Raw hue turns (#3089)
Co-authored-by: DylanMTaylor <10594816+dylanmtaylor@users.noreply.github.com>
2026-11-22 15:45:42 -05:00
Dylan M. TaylorandDylanMTaylor 9688cdf37e develop: keep Camera Raw quantile indices in bounds (#3088)
Co-authored-by: DylanMTaylor <10594816+dylanmtaylor@users.noreply.github.com>
2026-11-22 15:45:34 -05:00
Dylan M. TayloranddotCooCoo d2a776ee56 metafile: expose frame and source-unit facts (#3071)
* 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>
2026-11-22 15:45:26 -05:00
Terra854 1c137fea60 image-codecs: share bounded PNG sRGB metadata writing (#2941)
* image-codecs: share bounded PNG sRGB metadata writing

* png: reject legacy color chunks that conflict with sRGB
2026-11-23 03:38:34 +07:00
Terra854 12d0cec130 svg: identify the first element in SVG sniffing (#2909) 2026-11-23 03:36:36 +07:00
Terra854 b20e66f656 avi: share framed MPEG and AC-3 audio scanning (#2928) 2026-11-23 03:36:26 +07:00
Terra854 4499f2f828 exr: share bounded PXR24 scanline reconstruction (#2935) 2026-11-23 03:36:19 +07:00
Terra854 d5493fe6e6 exr: share bounded RLE and byte prediction (#2921) 2026-11-23 03:36:07 +07:00
Terra854 0da914f4a2 video: share seekable raw APV access-unit ranges (#2925) 2026-11-23 03:35:54 +07:00
Terra854 fb04a21e9d video: allow a lower Motion JPEG track allocation limit (#2916) 2026-11-23 03:35:41 +07:00
Terra854 1b8d0150da Normalize PostScript literal string line endings (#2844) 2026-11-23 03:33:23 +07:00
Terra854 66ed98f1fe usd: accept scalar external arcs with prim targets (#2707) 2026-11-23 03:33:12 +07:00
Terra854 4255a185db Resolve nested DrawingML compatibility choices (#2851) 2026-11-23 03:33:02 +07:00
Terra854 8adecb1cb0 Preserve short SVG elliptical arc sweeps (#2835) 2026-11-23 03:31:53 +07:00
Terra854 33e36c8cb7 Preserve finite SVG smooth control reflections (#2832) 2026-11-23 03:29:13 +07:00