Commit Graph
2197 Commits
Author SHA1 Message Date
Dylan M. Taylor 9053f5389f Merge pull request #1225 from Bra1nZ/fix/7230-legacy-v3-driver-zero-media-side
fix(print): trust one side of a legacy V3 driver's paper metric
2026-11-14 11:43:38 -05:00
Dylan M. Taylor d542e68c5b Merge pull request #1305 from TrevorBrown-dev/fix/web-jpeg-oversized-xmp
image-codecs: the web JPEG encoder trims or leaves out an XMP packet past one segment
2026-11-14 11:40:56 -05:00
Dylan M. Taylor 1f96d6b6bb Merge pull request #1278 from naxvog/docx/cell-margins-without-table-style
craft-docx: a file with no default table style gives its tables no cell margins
2026-11-14 11:36:33 -05:00
Dylan M. Taylor 689bd18cb6 Merge pull request #147 from midasmatterhorn/fix/r4-print-shrink-zero-scale
print: shrink-to-fit refuses a sheet the written matrix cannot represent
2026-11-14 11:34:07 -05:00
Dylan M. Taylor 29fb8f8e86 Merge pull request #1216 from dotCooCoo/feat/craft-texture-planes
craft-texture: add bounded float image planes and texture sampling
2026-11-14 11:28:44 -05:00
Dylan M. Taylor 15b013b305 Merge pull request #637 from dotCooCoo/fix/linesweeper-sweep-doc-left-scan
linesweeper: the left intersection scan in docs/sweep.typ compares with alpha^(i+1)
2026-11-14 11:19:24 -05:00
Dylan M. Taylor 553d10d5a4 Merge pull request #1221 from dotCooCoo/fix/hdr-isize-bound
craft-hdr: refuse buffers past isize::MAX bytes when limits are raised
2026-11-14 11:17:00 -05:00
Dylan M. Taylor a5ac3aa05c Merge pull request #1322 from storytold/codex/craft-xml-dtd
prepress: share PDF/X-1a finalization and checks (official replacement)
2026-11-14 10:14:26 -05:00
Dylan M. Taylor 53cc3c0f1a Merge pull request #1315 from storytold/sonar/s7688-bash-conditionals
scripts: test with [[ in fetch-opus-vectors.sh (SonarCloud S7688)
2026-11-14 10:00:27 -05:00
Dylan M. Taylor a207d20700 Merge pull request #1314 from AlexChambers/craft-raw/nikon-z6-z7-distortion
craft-raw: Nikon Z 6 and Z 7 in-file distortion; modes 1 and 3 only
2026-11-14 09:54:06 -05:00
Dylan M. Taylor bfea7d9800 Merge pull request #1317 from storytold/codex/jpeg-cmyk-app-compat-official
Preserve unmarked CMYK JPEG sample polarity
2026-11-14 09:38:51 -05:00
Naxvog 5f67d91eee craft-docx: a file with no default table style gives its tables no cell margins
Port of storytold/wordcraft#3821, whose reader code moved here with storytold/wordcraft#6603. Word's 0.08" cell margin comes from the Normal Table default table style; without a default table style a table that sets no margins (and whose style sets none) has zero margins. The zeros are kept as the table's own, also for the old properties of a tblPrChange, so they survive saving. w:default="on" now marks a default style too.
2026-11-14 15:27:22 +01:00
Dylan M. Taylor cebc847ba8 Merge pull request #1320 from storytold/codex/docx-normal-default-official
Respect default Normal styles in DOCX
2026-11-14 09:21:31 -05:00
Zinadin Zidan 45a8e16669 craft-midi: say when a lenient read left part of a file out at a limit (#1308)
read_smf_lenient keeps what comes before MAX_EVENTS events or MAX_TRACKS
tracks and only says so in a warning. Those warnings are words, and at
most MAX_WARNINGS of them are kept: when earlier damage has filled them,
nothing tells the caller that the file was cut.

LenientRead gets over_limit, set whenever either limit left something
out, full warnings or not. A caller that refuses over-limit files, as
read_smf does, can now do so after a lenient read. LenientRead is
non_exhaustive, so the new field breaks no caller.
2026-11-14 15:20:22 +01:00
midasmatterhorn 08c206f4ae Merge remote-tracking branch 'upstream/main' into r4-print-shrink-147 2026-11-14 16:55:58 +03:00
Dylan M. Taylor 8ef708255e test(jpeg): cover unmarked CMYK craft decoding 2026-11-14 13:39:46 +00:00
Trevor Brown 25d56bb49c Merge upstream/main into fix/web-jpeg-oversized-xmp 2026-11-14 08:32:33 -05:00
Dylan M. Taylor 8097ede0ff Resolve DOCX migration conflict with current main 2026-11-14 13:29:23 +00:00
Dylan M. Taylor 8f3247882d Fix unmarked CMYK polarity on craft JPEG path 2026-11-14 13:26:52 +00:00
Dylan M. Taylor 6d19bb44f3 fix(docx): preserve Normal inference compatibility 2026-11-14 13:25:25 +00:00
Dylan M. Taylor 6beefd7e95 fix(wordmodel): mark Normal as default in new documents 2026-11-14 13:25:25 +00:00
Dylan M. Taylor 31f4185fa5 test(docx): preserve explicit Normal-off serialization 2026-11-14 13:25:25 +00:00
Dylan M. Taylor 90d20fd39f fix(docx): keep default Normal for fresh documents 2026-11-14 13:25:25 +00:00
Dylan M. Taylor 00fdde1f06 docx: retain explicit nondefault Normal on write 2026-11-14 13:25:25 +00:00
Dylan M. Taylor a94c1a386a Respect on-valued default paragraph styles 2026-11-14 13:25:25 +00:00
Dylan M. Taylor 15740f3083 fix(docx): mark declared Normal as the default 2026-11-14 13:25:13 +00:00
Dylan M. Taylor c2a69bbdc6 Preserve unmarked CMYK JPEG samples 2026-11-14 13:23:47 +00:00
Dylan M. Taylor 3400dbc4d7 scripts: test with [[ in fetch-opus-vectors.sh
SonarCloud S7688 counts the POSIX [ tests in the Opus vector fetcher. The
script already needs bash for arrays and ${!ranges[@]}, so the tests use
[[ ... ]], which neither word-splits nor globs its operands.
2026-11-14 08:19:09 -05:00
Dylan M. Taylor d15bf1f35b Merge pull request #1288 from despotak/fix/12473-jpeg-past-2-30
image-codecs: jpeg_info, a JPEG's frame and held coefficients from its markers
2026-11-14 07:42:05 -05:00
Dylan M. Taylor 94777dcf7f Merge pull request #1298 from dylanmtaylor/codex/jpeg-baseline-encoder
jpeg: add optimized baseline encoder
2026-11-14 07:30:54 -05:00
aiongg ea1c84290d image-codecs: list InkSet and ExtraSamples on TiffPage (#1307)
* image-codecs: list InkSet and ExtraSamples on TiffPage

* image-codecs: TiffPage InkSet and ExtraSamples as enums

* image-codecs: InkSet::InkNames, and Invalid for undefined tag values
2026-11-14 07:18:01 -05:00
Dylan M. Taylor 1118899c28 Merge pull request #1299 from dylanmtaylor/codex/rtf-unicode-compat
craft-rtf: preserve legacy Unicode escape handling
2026-11-14 07:15:01 -05:00
Dylan M. Taylor 4b81cbae60 Merge pull request #1296 from dylanmtaylor/codex/docx-invalid-ilvl
fix(docx): ignore malformed list levels
2026-11-14 07:00:18 -05:00
Trevor Brown db474747d0 image-codecs: wrap the encode_jpeg_rgb8 doc comment like the rest of the file 2026-11-14 06:44:08 -05:00
Trevor Brown a2722537fc image-codecs: the web JPEG encoder trims or leaves out an XMP packet past one segment
encode_jpeg_rgb8 wrote the XMP packet straight into an APP1 segment, so a packet past the limit failed the whole encode. It now builds the segment with the shared jpeg::xmp_segment, as the other JPEG paths do, and jpeg_xmp_fits tells callers whether the XMP will be written.
2026-11-14 06:43:36 -05:00
Dylan M. Taylor 7e4ff41f16 Merge pull request #1284 from storytold/codex/docx-underline-off
wordmodel: honor explicit underline off values
2026-11-14 06:35:21 -05:00
Dylan M. Taylor 9ce392cb6a jpeg: document baseline encoding 2026-11-14 11:21:01 +00:00
Alex Chambers 5151457b99 craft-raw: Nikon Z 6 and Z 7 in-file distortion; modes 1 and 3 only
Ported from storytold/lightcraft#3796. The Z 6 and Z 7 join the bodies whose
NikonNEFInfo distortion becomes an OpcodeList3 warp. Three Z 6 and three Z 7
CC0 raw.pixls.us files (NIKKOR Z 24-70mm f/4 S) were matched against the
camera's embedded JPEG: the corrected radial median error is 0.88-0.96 px on
the Z 6 and 1.37-1.46 px on the Z 7, from 83-84 px and 124-125 px uncorrected.
The method and results are in crates/raw/docs/nikon-lens-corrections.md.

DistortionInfo's mode byte must now be 1 (On, optional) or 3 (On, required).
Mode 2 (Off) and unknown modes give no warp, where before only 0 was skipped,
so mode-2 files from the Z 6II, Z 8 and Z f no longer get a warp.
2026-11-14 12:20:57 +01:00
Dylan M. Taylor 55901e1d1a jpeg: assert encoded chroma sampling factors 2026-11-14 11:17:30 +00:00
Dylan M. Taylor 1a950613f9 Merge remote-tracking branch 'origin/main' into codex/jpeg-baseline-encoder 2026-11-14 11:13:33 +00:00
41fb227542 feat(ps): add bounded shared PostScript EPS reader (#1276)
* feat(ps): add craft-ps with an EPS reader (read feature)

The reading half of craft-ps (#115): a clean-room PostScript interpreter
that runs an EPS and returns what it paints as a one-page vector PDF of
its bounding box, colours kept, so apps can draw and export EPS as a
placed PDF. Moved from DesignCraft (storytold/designcraft, where it was
written for placed EPS), with its app-specific names made neutral.

Written from the PostScript Language Reference (3rd ed.), the EPS
specification, the Type 1 Font Format and Adobe TN 5012/5176/5177.
Covers the language, paths, clipping, strokepath, device/Separation/
DeviceN/Indexed/ICCBased/Lab colour, images with lazily decoded filters,
shadings 1-7 and patterns, and Type 1/3/42/CFF/CID text through CMaps,
horizontal and vertical.

Bounded: each operator charges work proportional to its operands
against the step limit as it goes, every byte read or decoded counts,
copies count against the memory cap; defaults 50 M steps / 1 GiB, and
20 M / 256 MiB on wasm32. No panics (deny lints, fuzzed in debug
builds). 34 tests, the Type 42 one on a TrueType font built in the
test. No new external crates: pdf-writer, miniz_oxide, weezl, skrifa
and kurbo are already locked at these versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* clippy(ps): document stateful decoder complexity

* fix(ps): bound huge arc angle normalization

* fix(ps): preserve EffectCraft EPS text and limits parity

* fix(ps): address interpreter review findings

* fix(ps): preserve composite glyph paint order

* fix(ps): address interpreter review findings

* fix(ps): bound filter buffers and preserve file aliases

* fix(ps): make predictor allocation fallible

---------

Co-authored-by: markus.doebele <markus.doebele@top21.sh>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:10:27 -05:00
Dylan M. Taylor 4fa98367f8 rtf: preserve legacy invalid Unicode handling 2026-11-14 11:10:12 +00:00
Dylan M. Taylor 1cc7a21416 jpeg: add optimized baseline encoder 2026-11-14 11:05:21 +00:00
Dylan M. Taylor 4baa7d81ca fix(docx): ignore overrides without a list level 2026-11-14 10:57:01 +00:00
Dylan M. Taylor 7ac384839d fix(docx): ignore malformed list levels 2026-11-14 10:45:23 +00:00
dotCooCoo abcfe7ddc3 Merge main into feat/craft-texture-planes 2026-11-14 02:45:18 -08:00
Bra1nZ 05c2e38271 fix(print): reject a partial record whose known name contradicts the sheet
A review finding on #1225: a single agreeing partial record was taken on
its known side alone, so a Legal request could take a keyword entry
named Letter reporting (215_900, 0) - the ticket then selects Letter
while the layout assumes Legal. A single partial record now refuses when
its known name doesn't match the requested standard sheet; an unnamed
one is still taken on agreement alone.

The name check exposed names_paper accepting a word modifier as a
dimension: "A4 Extra" matched "A4" because the suffix rule only looked
at the first character, a space. The rule now reads the word after the
separator: a letter is a modifier ("A4 Extra" is another paper), a digit
is the sheet's dimensions ("A4 210 x 297 mm"), a digit or letter right
against the name is a different name ("ARCH E1", "A4Extra").
2026-11-14 13:16:41 +03:00
Dylan M. Taylor b473c24097 wordmodel: honor explicit underline off values 2026-11-14 10:05:58 +00:00
ChristosandΝύξ 🌑 b270477c25 image-codecs: count the coefficients of a frame whose first scan lacks components
zune-jpeg also holds every coefficient beside its output when an 8-bit
sequential frame's first scan lacks some of its components: no row is
finished until the scans that bring the others. jpeg_info now reads the
first scan's component count and reports these as held_coefficients
(was progressive_coefficients). The #12473 map rewritten with one
component per scan was admitted at 12.6 GB without this, and
OOM-killed in a 14 GB cgroup.

Co-Authored-By: Νύξ (Nyx, AI) 🌑 <nyx@despotak.is>
2026-11-14 12:05:41 +02:00
ChristosandΝύξ 🌑 b3558f6821 image-codecs: test jpeg_info with four and two components
Four components read as CMYK. Two, a layout decode doesn't return,
give None.

Co-Authored-By: Νύξ (Nyx, AI) 🌑 <nyx@despotak.is>
2026-11-14 12:05:41 +02:00