Commit Graph
7039 Commits
Author SHA1 Message Date
aiongg e1e8f86845 Pen: whose anchors a draft's are is a state of the handed-in draft (PenDraft), read by Delete, Backspace and remove_last alike 2026-11-16 14:10:37 +00:00
Hamza e096b5eb9b craft-csv: a diacritic before another escape keeps it as written
An escape's diacritic took the next character as its letter even when that was the next escape (ESC N H ESC N H o gave ESC + U+0308 + NHo). A control character is no letter: the first escape is kept as written and the next one decodes on its own (ESC N H ö).
2026-11-16 19:07:27 +05:00
FredApps a1f8141307 media: reopen FileReader from the path resolved at open
A relative path was stored as given, so after the pool evicted the
handle a later working-directory change could reopen a different
same-length file. Resolve std::path::absolute once before the first
open and reuse that path. The regression runs in a subprocess so it
does not change other tests' cwd.
2026-11-16 15:04:19 +01:00
aiongg 594f455b80 Save for Web: the slice number inset is the tight gap token 2026-11-16 14:04:19 +00:00
aiongg fca840bcc5 Per-statement marks for the print marks; exception entries for the vec2 allows; slice number inset allow 2026-11-16 14:02:50 +00:00
FredApps e60702ab1c Merge pull request #1861 from storytold/render-parity-harness
craft-render-parity: compare two renders against a stated tolerance (#587)
2026-11-16 15:02:00 +01:00
aiongg 3bce302286 Allow markers for printer marks, print story page sizes and the Convert Point cursor tip 2026-11-16 14:01:16 +00:00
aiongg 5e5a4364dd design-lint: literal -1, 0 and 1 vectors are directions, not sizes (literal-size/vec2) 2026-11-16 14:01:16 +00:00
FredApps f71eeae5fa Add craft-color and craft-frame for compositor pictures
craft-color holds ColorInfo, HdrMetadata, Y'CbCr matrices, transfer
functions and the small helpers display conversion needs. It is not a
colour-managed pipeline (no LUTs, log, grade or tone mapping).

craft-frame holds VideoFrame, PixelData, Chroma and Region: the
compositor and display picture type MediaSource will return. It is
distinct from craft-video's decoder-output VideoFrame (#1231 / #1768).

Came from the metadata and picture parts of filmcraft-color and
filmcraft-frame. Part of #778 and effectcraft#781.
2026-11-16 14:58:59 +01:00
aiongg 4fb9c7c0a5 craft-draw: trial for the transform box's secondary-click mode menu 2026-11-16 13:58:43 +00:00
FredApps 43db2f024e media: refuse FIFOs before opening a FileReader
Opening a named pipe with no writer blocks. Check the path is a regular
file first, then open with O_NONBLOCK (as filmcraft-media does), and
check the handle again so a FIFO swapped in after the path check cannot
hang the open or a reopen after eviction.
2026-11-16 14:58:40 +01:00
FredApps 16bf5f8578 media: add a pooled FileReader ByteSource
FileReader reads a file in place and keeps at most MAX_OPEN_FILES
descriptors open in a shared LRU pool, reopening by path when a file
was closed. A project with hundreds of clips can stay under the process
file-descriptor limit. A file truncated since it was opened is refused.

Part of #778 and effectcraft#781.
2026-11-16 14:52:55 +01:00
Hamza ab87149855 craft-csv: decode Excel's character escapes in SYLK text
Excel writes a character outside ASCII in a SYLK text value as ESC N and one byte, the character's ISO 6937 code less 0x80; a diacritic's code is followed by the letter it goes on. The reader kept those bytes, so Größe für Köln opened as Gr<ESC>NHo<ESC>N{e f<ESC>NHur K<ESC>NHoln (storytold/gridcraft#4321). Text values now decode them: a diacritic and letter become the precomposed letter (or the letter and its combining mark when Unicode has no single character), a spacing code its character; a code ISO 6937 doesn't define is kept as written.
2026-11-16 18:51:40 +05:00
FredApps e836b6fd89 Merge pull request #1849 from storytold/feature/craft-macho
Add craft-macho: Mach-O slice tables and header names from Craft Anything
2026-11-16 14:46:00 +01:00
FredApps ceffcc52da Merge pull request #1846 from storytold/feature/craft-pe
Add craft-pe: PE/COFF headers from Craft Anything
2026-11-16 14:45:21 +01:00
aiongg c02478d2b1 HistoryEvent::rename/new_snapshot and SwatchEdit::move_group constructors 2026-11-16 13:44:24 +00:00
aiongg f647f41e82 Merge branch 'dl/api' into dl/all 2026-11-16 13:39:11 +00:00
aiongg be59c9572f Merge branch 'dl/props' into dl/all 2026-11-16 13:39:10 +00:00
aiongg b39d967677 Merge branch 'dl/contract' into dl/all 2026-11-16 13:39:10 +00:00
StDenis1980andClaude Opus 5.5 0b0e5accd5 docx: set_application_name for apps that embed the writer
An app that ships the writer under its own name names itself in docProps/app.xml
(<Application>); "WordCraft" until set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:37:37 +01:00
FredApps 17afe46839 Merge pull request #1843 from storytold/feature/craft-tar
Add craft-tar: TAR and cpio member walkers from Craft Anything
2026-11-16 14:36:11 +01:00
aiongg fbe5a16ffe design-lint: api/non-exhaustive: #[non_exhaustive] on public types and variants, constructors where other crates build them 2026-11-16 13:31:29 +00:00
aiongg 3be93ea350 design-lint: contract/keys, contract/egui-import, contract/pointer, test/harness: imaging's raw story presses through testing::input, SelectMask::start_pass, CylinderValues::moved, the magnetic width trial in the select trials 2026-11-16 13:29:30 +00:00
aiongg 2512b3c381 design-lint: style/token-read: StyleCx::of_env gives the style context of a scope (with_root and ContentPainterCx::style_cx build on it); the adjustments grid works out its columns from it 2026-11-16 13:29:30 +00:00
aiongg da0fcfd21a design-lint: props: derive the setters of ui-widgets components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg bc9b545e5f design-lint: props: derive the setters of ui-patterns components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 394579be1c design-lint: props: derive the setters of ui-panels components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg a7bc89dde1 design-lint: props: derive the setters of text components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 183d99f0c2 design-lint: props: derive the setters of print components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 290f3f45f1 design-lint: props: derive the setters of imaging components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 305bc92fbd design-lint: props: derive the setters of draw components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 6697fc9ebc design-lint: props: derive the setters of color components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg d580ecfc16 design-lint: rustfmt the files of the contract fixes 2026-11-16 13:25:07 +00:00
aiongg f6ac586b18 design-lint: contract/entry, contract/pointer: CropSession::show_frame; the reset button reads the contract's click 2026-11-16 13:23:38 +00:00
aiongg af3758b54e design-lint: contract/egui-widget: the comp comment tip is a Text 2026-11-16 13:23:38 +00:00
aiongg 98500a9576 design-lint: contract/memory, test/literal-size: each preset kind's browser keyed by a salted Stack; the guide trial asserts the typed position 2026-11-16 13:23:38 +00:00
aiongg 25ea7622ba Merge branch 'fw/merge-i' into area/fwb2 2026-11-16 13:23:08 +00:00
aiongg ca1a3c72bf Merge branch 'fw/merge-h' into area/fwb2 2026-11-16 13:23:08 +00:00
aiongg 404e03bc63 design-lint: contract/platform, contract/memory: the freedesktop icon lookup lives in craft-window (theme_svgs), so caption icons need no target cfg; desktop icons kept in a session slot; the memory rule's scope_builder test reads the builder argument, not the closure body 2026-11-16 13:22:31 +00:00
aiongg 3af946a321 design-lint: contract/memory, contract/shadow: dock request lists in a runtime::memory session slot; Flyout::show_popup no longer hides the library's show 2026-11-16 13:22:31 +00:00
aiongg b96b48666f merge-fwh: pen: PenTool::deletes, Delete and Backspace left to the app for a draft the selected tool does not own (a864229579) 2026-11-16 13:21:50 +00:00
aiongg 839b67b628 Merge branch 'fw/merge-fb' into area/fwb2 2026-11-16 13:20:06 +00:00
aiongg 2c129a64e3 merge-fwf: F3 pointer slop: Sense::FOLLOWS_IN_SLOP (Sense widens to u32) declares a drag part that begins at the first move inside slop; TransformBox's following parts declare it; the suite's pointer-slop case expects one gesture ending in a Commit within slop for it, reading the part's sense by owner 2026-11-16 13:19:54 +00:00
aiongg 62523e765b design-lint: contract/egui-import, contract/memory, test/cfg-test: ui-canvas's picture slot is a contract PaintSlot (PaintUi::reserve_slot); tool fixture and brush story ids and memory through runtime::memory and StoryData; ruler tick trial in the integration binary 2026-11-16 13:19:50 +00:00
Dylan M. TaylorandVoiceLessQ 6ef2c053df tiff: share allocation-free first-image compression probe (#1867)
* tiff: share WordCraft classic compression probe

Extracted from storytold/wordcraft crates/geom/src/picture.rs at fe8a8a838cde68b272ac68429e53049347feab40. Original implementation by VoiceLessQ; retains Dylan Taylor duplicate-tag hardening from ab0020d6f.

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>

* tiff: cover compression probe refusal and endian parity

* test(tiff): allow assertions on bounded fixture conversions

---------

Co-authored-by: VoiceLessQ <t12kaem@gmail.com>
2026-11-16 08:19:29 -05:00
aiongg 464ded51f4 merge-fwi: craft-settings: SettingsStore::read, a read-only load on the store's own load path 2026-11-16 13:18:40 +00:00
2f8b328c6f Add craft-elf: ELF program headers and dynamic entries from Craft Anything (#1851)
Moves the header pieces of Craft Anything's crates/formats/src/elf.rs
into a pure-Rust crate: the class/endian-aware reader, program_headers,
ProgramHeader, dynamic_entries, va_to_off, and the segment type,
permission and dynamic tag names. Mitigations, dynamic symbols, symbol
versions and core-file notes stay in the app.

Part of #778.

Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: GGWA <65288322+rech4210@users.noreply.github.com>
2026-11-16 08:18:20 -05:00
aiongg 858b1c1793 merge-fwh: anchor tools: AnchorTool, the canvas tool of Add/Delete Anchor, Convert Point and Direct Selection (no press, own cursor, shown pen draft) 2026-11-16 13:17:17 +00:00
Dylan M. TaylorandAndy Ching 046a7229af fix(docx): integrate VML fallbacks without breaking linked text-box stories (#1864)
* craft-docx: write Word 2010 shapes inside mc:AlternateContent with a VML fallback

A shape was written as a bare `wps:wsp` in `w:drawing`. Word 2007, and
Word 2000-2003 with the Office Compatibility Pack, don't know `wps` and
refuse the whole file. Word writes such shapes in `mc:AlternateContent`.

`write_shape` now guards the drawing with `mc:Choice Requires="wps"` and,
for rectangles, text boxes, rounded rectangles and ellipses, adds an
`mc:Fallback` with the shape as VML: size, position, z-order, wrapping,
fill, outline and the text box's text (copied from the choice's output,
so the story isn't written twice). Other kinds get no fallback; an old
reader skips that shape and still opens the file.

Refs storytold/wordcraft#6849

* craft-docx: guard a shape only when it gets a VML fallback; keep more in the fallback

A shape guarded by `mc:AlternateContent` with no fallback is skipped by
a reader that doesn't know `wps`, and dropped on that reader's next save:
worse than refusing the file. Such shapes are written bare again; only
shapes with a VML form are guarded.

The VML fallback also keeps the shape's own stacking order (a floating
object in its text box moved `self.z` on), its wrap distances, its hidden
flag and its text box's text direction.

* craft-docx: keep behind-text shapes' order in the VML fallback

A behind-text shape's fallback `z-index` was the negated `z`, which
reverses the order of overlapping behind-text shapes. It is now `z`
shifted below zero within signed 32-bit range, so a higher `z` still
stacks higher; other shapes' `z-index` is capped at `i32::MAX`.

* fix(docx): preserve linked text boxes without an incomplete VML fallback

---------

Co-authored-by: Andy Ching <53651198+andyching168@users.noreply.github.com>
2026-11-16 08:16:40 -05:00
FredApps dd345db898 image-codecs: read a raster's resolution from its headers (resolution_probe) (#1838)
* image-codecs: read a raster's resolution from its headers (resolution_probe)

file_resolution(bytes) gives the pixels per inch a JPEG, PNG, WebP, BMP or
classic TIFF records without decoding pixels. JPEG uses the decoder's marker
scan (Photoshop, XMP, EXIF, then JFIF), PNG reads pHYs as the decoder does and
falls back to eXIf, WebP its EXIF chunk, TIFF its IFD0 tags; BMP reads the
info header's pixels per metre. Values outside 1-100000 ppi count as none.

DesignCraft (crates/images/src/resolution.rs) and FigCraft
(crates/format/src/density.rs) each carry their own marker and chunk walkers
for this; they can switch to the shared probe.

Part of #778 and #785.

* image-codecs: resolution_probe reads only a whole nine-byte pHYs, and a zero one leaves eXIf

A pHYs chunk that declares any other length, or is cut off before its
CRC, records nothing, and its data is no longer read from the bytes
after it. A zero pixels-per-metre count records nothing either, as in the
decoder, so the eXIf resolution still answers.
2026-11-16 08:14:38 -05:00