Extract the Craft Anything implementation at 8cec25d without changing limits or data models. Retain provenance for subsequent Afloat, BFlat, and RRFZ changes in the crate README.
The grip under a tool rail's column bar starts a drag of the rail's group;
released over empty room it floated the group under the pointer, which the
model refuses for a group that floats already, so a floating toolbar's grip
did nothing. A unit that is a whole floating window now moves that window
under the pointer (Action::MoveFloating), as its title row does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The grip strip above an icon group and under a tool rail's column bar
was the least hit size (8 points), so the 5-point ticks nearly touched
its top edge. It is now tall enough for the theme's marks with
space.gap.tight above and below them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without a ready face the sample measured no width, so an unavailable sample
allocated nothing. It reserves the most the ready layout can take, the width it is
offered, at LINE_EM of its size: the band the sample will draw in. A ready face
lays out as before.
DocumentWindow::level stands the window at a WindowLevel; with Palette a
floating document stays above the app's main window while the app is
active, drops below a blocking dialog and hides with the minimized main
window. first_placed's doc says what it does: the window is kept at the
rect while shown, so a caller whose user moves the window follows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shape.grip in a theme file sets the grips' marks: ticks or dots, how many,
a tick's length, a mark's width and the gap. Each value is optional and
keeps the default, now eleven ticks five points tall (one more mark and
one point taller than the reference application's ten of four). The
theme editor, the writer (unknown keys kept) and the token dumps carry it;
GripMarks paints from the tokens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port bounded QuickDraw PICT parsing from VectorCraft into craft-metafile, outputting the neutral Picture model. Preserves limits, error reporting, and test coverage.
The banner drew the preview text in the current family even when its face lacks the
text's characters (tofu). It takes the rows' sample text, through the same
FamilyInfos::sample_text: the text, else the family's name, else its first glyphs.
Every row's sample shows the picker's sample text: the host's preview text, else the
sample word. The Arabic second sample and its script check are gone. A face that
lacks the text's characters keeps the existing fallback: its name, else its first
glyphs.
A sample, in a row, the banner or the panel, is laid out and drawn only in its own
face once it is ready. Until then (and for good when the face is unavailable or the
family has none, SampleFace::Missing) it keeps its band, LINE_EM of its size high,
and draws nothing, instead of laying the text out in the interface face, which may
lack its characters.
The Arabic story becomes font_picker_arabic_sample_text: an Arabic preview text over
a catalog with Noto Sans Arabic.
A trailing or optional field was capped at the base row height, so in a taller row
(a large thumbnail) a field that measures taller was cut to one base row and centred,
clipping what it drew outside that band (the font picker's Arabic sample lost its
hamza and dots). It is capped at its slot, the row's height, as cell fields are.
The overlay test also moves the image with Auto Center Preview on, and a CropTool test moves an
upright frame past the canvas with the default settings (image mode, Auto Center, Delete Cropped
Pixels on), at 31 % and with snapping to the document's edges, as the app runs it.
Part of storytold/photocraft#16404.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
preview now reads a DISP chunk only when its first 4 bytes are
08 00 00 00 (every DISP chunk in the sample files starts so) and its
bitmap has a 40-byte info header, a plane count of 1 and uncompressed
pixels: compression 0 at 1, 4, 8, 16, 24 or 32 bits, or compression 3
(color masks) at 16 or 32 bits, as the bitmap info header page states.
A color table may not hold more than 2^bit count colors, and the
image size must be 0 or the rows' size, as in every sample. Other bit
counts with those compressions fail as damaged; other header lengths
and compressions are refused as unsupported. A DISP chunk of another
kind, or a bitmap with another header length or compression, is passed
over, and a file with no later DISP bitmap that preview reads is
refused as unsupported. Before this, a bit count of 0, compression 6 or a header
of another length gave a BMP file whose pixel offset was wrong, and
the rows were checked only for compressions 0 and 3. The row size is
now computed in 64 bits, so 32-bit targets accept the same bitmaps as
64-bit ones. The BMP file ends with the last row: bytes after it in the
chunk are left out, and the file's memory is reserved fallibly.
A RIFF file without a DISP bitmap now gives Ok(None) only when its
last chunk ends where the form's length says, inside the file. A chunk
that runs past the form, a partial chunk header at the end, a file cut
short or a form length too short for the form type fails as damaged,
since the missing bytes may hold the picture. A file cut short still
gives a DISP chunk it holds whole.
A version 2 file keeps a 1-bit picture (R40) that preview does not
read, so preview refuses it as unsupported instead of reporting no
picture. Version 1 still gives Ok(None).
Tests cover each of these cases, a package that holds both thumbnail
members, and the package member count limit. The hostile-input
property tests in tests/it/read.rs now also run preview, including
deflated thumbnail members and a compressed list before the DISP
chunk, and check that a package without a picture member gives
Ok(None) whatever its damaged drawing holds.
The README and the preview doc comment say that preview does not check
the drawing's version. PROVENANCE.md row R76 records that no sample
package's RIFF stream has a DISP chunk, and the crate description
mentions the preview.
The story's catalog had no face that maps Arabic, so no row showed the
Arabic sample. craft-font-manager's build script embeds Noto Sans Arabic
with fonts-build's Embed when the suite feature is on and CRAFT_FONTS_DIR
names a craft-fonts checkout; without it the table is empty and the story
shows the other families only.