* #778: take craft-libs integration/wordcraft-778 at beeea924
Every craft-libs git dependency (workspace, ui-egui, wordcraft, wordcraft-web,
krilla patch) moves from 453b0da782 to beeea92451 (craft-libs main 0649a07aa
plus open PRs #2061-#2064). Cargo.lock: only craft-libs sources move, plus
windows-sys edge changes inside craft-libs crates; no crates.io versions change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: docx stacking-order test follows the shared reader's one-more z
craft-libs 5f453efa9 (craft-docx: a relativeHeight of 0 stays the lowest
stacking order) reads Float::z as one more than the file's relativeHeight and
writes stored orders one less, so a file's 0 is no longer "none". The test
expected the old values; relative order and the round trip are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: take craft-libs integration/wordcraft-778 at 24a15211
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* deps: pin craft-libs to the merged shared cutover prerequisites
* #778: pin craft-libs main at 93dac78c (with #2061-#2064)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: picture probes use craft-image-codecs (DIB wrapping, JPEG budget, PNG/WebP) (#6955)
* #778: picture: wrap clipboard DIBs with craft-image-codecs' bmp_probe
probe_dib's local dib_to_bmp and dib_layout are replaced by
craft_image_codecs::bmp_probe::{dib_to_bmp, dib_layout}. The shared copies are
the same code; the only change is that they reserve their output fallibly. A
failed reservation in dib_to_bmp (the BMP's bytes can't be allocated) is
Refusal::TooLarge with the size the DIB header declares, the refusal a picture
too large to hold already gets; dib_layout leaves the DIB unchanged then.
The local dib_to_bmp name stays as a thin wrapper returning Result<_, Refusal>.
The old code is kept in the tests as an oracle: wrapping and layout are
byte-equal on thousands of crafted DIBs (core, info, V4, V5 headers, bit
fields, alpha with BI_RGB, every truncation), and probe_dib agrees.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: picture: budget JPEG coefficients with craft-image-codecs
probe's JPEG held-coefficient estimate (jpeg_coefficients, frame_coefficients,
worst_coefficients) is replaced by craft_image_codecs::jpeg_worst_case_coefficients,
which returns the larger of that same estimate and the shared held_coefficients.
So the charge can only grow, never shrink.
It grows for: a SOF0/SOF1 8-bit first frame whose first scan has fewer
components than the frame (the decoder holds the coefficients until the other
scans); and a first-frame SOF2 with sampling factors above 4 (the old rule
clamped them to 4). A real baseline JPEG with all components in its first scan
is charged nothing, as before. With the 512 MiB budget, a 4:4:4 non-interleaved
baseline JPEG is now refused from about 59.6 Mpx instead of 67 Mpx; 4:2:0 and
4:2:2 stay under the RGBA8 conversion and are unchanged.
The old code is kept in the tests as an oracle: the new charge is never less
(crafted headers, every prefix, random damage), equal where the shared rule adds
nothing, and one test pins a case where it grows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: picture: read PNG and WebP probes with craft-image-codecs
The local png_chunks header read is replaced by
craft_image_codecs::png_probe::pixel_model, and the VP8X alpha check in probe
by webp_probe::has_alpha (an error reads as no alpha, as non-RIFF input did).
PNG: for every valid colour type and bit depth, with and without tRNS and an
iCCP chunk, the size, bytes a pixel and alpha are what the old read gave
(PixelModel::bytes_per_pixel is channels * 2 for 16 bits, else channels, with a
palette as RGB and tRNS adding a channel to grey, RGB and palette). pixel_model
is stricter, so these are now refused (probe: Refusal::Broken, dimensions:
None) where the old read measured them: an invalid colour type and bit depth
pair, a zero or past-i32::MAX side, and more than 65,536 chunks before the
image data. None is a valid PNG.
WebP: a bare lossless (VP8L) picture whose header sets alpha_is_used now reports
alpha; the old rule only knew the VP8X flag.
The old PNG read and WebP rule are kept in the tests as oracles.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: picture tests follow craft-image-codecs' DIB fixes
The shared dib_to_bmp no longer adds 12 appended mask bytes to the pixel
offset of 52/56-byte BI_BITFIELDS headers, and dib_layout treats the bytes
after the header as a mask copy only when the payload is longer than the
pixel rows need. The differential test excludes exactly those inputs by
named predicate, asserts the new output for them, and stays byte-equal
elsewhere.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: dib_header_dims uses the shared fallible dib_to_bmp
Calls the shared probe directly so a failed allocation cannot recurse through the refusal wrapper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* #778: WordCraft's MCP stdio server runs on craft-mcp-server (#6956)
The JSON-RPC framing, bounded line reading, initialize, ping, tools/* and
resources/* now come from craft_mcp_server::Server; WordCraft keeps its tools,
resources, instructions and backends. The old server.rs stays as a test-only
oracle for a differential test. click/key schemas list every argument the app
accepts, since the shared check refuses unlisted ones.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
* doc: reuse shared legacy codepage tables with parity tests
* Regenerate codepage dependency ordering in Cargo lockfile
* #778: Cargo.lock: wordcraft-doc depends on craft-codepage after merging main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Message encoding, reply framing and final-code parsing now come from the shared crate;
socket discovery, timings, conversation and events stay here.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
The local is_text/decode/legacy copies in formats::txt are replaced by a re-export of
craft_mime::detect. The old code stays as a test oracle, with differential and random-buffer
tests showing identical output. chardetng stays only as a dev-dependency of that oracle.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* #778: take craft-libs integration/wordcraft-778 at beeea924
Every craft-libs git dependency (workspace, ui-egui, wordcraft, wordcraft-web,
krilla patch) moves from 453b0da782 to beeea92451 (craft-libs main 0649a07aa
plus open PRs #2061-#2064). Cargo.lock: only craft-libs sources move, plus
windows-sys edge changes inside craft-libs crates; no crates.io versions change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: docx stacking-order test follows the shared reader's one-more z
craft-libs 5f453efa9 (craft-docx: a relativeHeight of 0 stays the lowest
stacking order) reads Float::z as one more than the file's relativeHeight and
writes stored orders one less, so a file's 0 is no longer "none". The test
expected the old values; relative order and the round trip are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: take craft-libs integration/wordcraft-778 at 24a15211
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* deps: pin craft-libs to the merged shared cutover prerequisites
* #778: pin craft-libs main at 93dac78c (with #2061-#2064)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
* Fonts: tell where a missing font can be downloaded (Get the Missing Fonts)
A document opened from a file that is missing fonts their publisher gives
away (Microsoft's Aptos family, Cascadia Code and Mono) brings up a box
naming each font, the font drawn instead, the publisher's download page and
how to install the download. Once per document; never for a new document or
one a script opened. "Don't show this again" turns it off (File > Options >
General turns it back on); the status bar's missing-fonts menu opens it by
hand (ui.dialog fontDownload).
font.missing reports the same page as "download", so agents get it without
the box. WordCraft links to the page only: nothing is downloaded or bundled.
The desktop and web apps switch the box on at start-up
(tell_about_font_downloads); tests and ui_shot don't, so what they show
doesn't depend on the fonts installed where they run.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: the box with nothing to download is one row tall
Its Close button's far-side layout took the rest of the window's height.
The button row is now a row of its own, shared by both forms of the box.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Floating windows: a flat title bar and room around the content
Dialogs, the Read Aloud player and the built-in file browser had a grey
band behind a centred title and 6 pt margins. The title bar is now the
window's own colour with no band or line under it, and the title and the
content have 18 pt of room. The close box follows the new title bar height.
egui fills the front window's title bar with the colour of an open menu
button, so show_window makes that colour the window's while the title bar
is drawn and puts it back before the content is.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: a headline, a card to each download, numbered steps
The box was a plain table and a paragraph of steps. It now opens with the
warning mark and how many fonts are missing; lists each download once
(Aptos and Aptos Display come in one) with the fonts drawn instead, the
publisher and a Download button that opens the publisher's page; and gives
the two steps that add the download, with Add Font… beside its step.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Fonts: the download pages are a JSON list (font_downloads.json)
The list of fonts their publisher gives away, and each publisher's page,
was a table in the code. It is now crates/fonts/src/font_downloads.json,
built into the app: adding a font is a new entry there. Entries without a
family, a publisher or an https page are left out, and a list that isn't
JSON has no downloads rather than failing.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: licence notice, and fonts offered with limits
The box says that fonts come with licence terms and that following the
publisher's terms is up to the user. A font whose publisher limits who may
use it is marked "restricted" in font_downloads.json, says so on its card
and in font.missing ("restricted"), and has a card of its own.
The list gains Selawik (Microsoft's open-source font) and, marked
restricted, Segoe UI Variable, Segoe Fluent Icons and Segoe MDL2 Assets
from Microsoft's Windows design downloads page. Plain Segoe UI is not
offered for download and is not matched.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: the downloads scroll in a short window
With many downloads in a short window the box ran past the bottom of the
screen, leaving the steps, Add Font…, Don't show this again and Close out
of reach. The cards now scroll in the room the window has left, between
96 and 320 pt, and the rest of the box stays in view.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Get the Missing Fonts: all above the Close row scrolls in a short window
Only the download cards scrolled, within fixed limits, so in a window
shorter than about 480 pt the opt-out and Close could still fall off
screen. Everything above the row with Don't show this again and Close now
scrolls in the room the window has left, and that row stays on screen.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Floating windows: the flat title bar and wider margins leave this change
Reverts 2d39c54e and its revision-history row. The restyle changes every
dialog, the Read Aloud player and the file browser, and is to be reviewed
on its own.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Get the Missing Fonts: the headline counts the fonts that can be downloaded
The box lists only the missing fonts with a download, so "1 font in this
document isn't installed" was wrong for a document missing others too. It
now says "1 missing font can be downloaded", and the line under it no longer
mixes one and many.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
`dib_header_dims` read a DIB header's width and height by hand. It now
wraps the header's first 12 bytes as a BMP and asks
`craft_image_codecs::bmp_probe::dimensions`. Header sizes other than 12
and 40 or more are still refused here, since the probe reads them as
info headers. The old reader stays as a test oracle.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* #778: zip_guard delegates to craft-zip's entry-count guard
wordcraft_doc::zip_guard::check and zip64_entry_count_sample now call craft-zip, which also
treats a central-directory size of u32::MAX as a ZIP64 marker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: Cargo.lock: wordcraft-doc depends on craft-zip
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #778: zip_guard: craft-zip test-support as a dev-dependency
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
SonarCloud's coverage shards run tests built with -Cinstrument-coverage
on shared runners. Tests that assert a wall-clock limit or a time
ratio swing there: the megabyte-word test took 5.7-23 s against a
15 s limit, and three linear-time tests read 24-31x against 24x. Each
one that flakes turns main red after merging.
Ignore under cfg(coverage) every test whose purpose is performance
(linear time, bounded, capped, fast). The gate CI still runs them all
uninstrumented. Behaviour tests that only carry a generous time guard
(fuzz, never-panics, clipboard, regex, render, recent fonts) and the
SSIP speech timeout tests keep running, so their checks stay covered.
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Dependencies: take craft-libs main at 3af2280ee3
Every craft-libs git dependency (the workspace's 25, ui-egui's 3, the app's
craft-print, the web build's 2 and the krilla patch) moves to craft-libs main
at 3af2280ee3 from the 8 revisions they were pinned at. Cargo.lock changes
those sources, moves winprint and craft-winprint-gdi with craft-print, drops
the second craft-tiff, and adds cap-primitives and its dependencies, which
craft-font-store's Language pack recovery uses on native builds.
- craft_print::Job has two new fields. WordCraft sets grey_pages to false,
since it does not turn the spooled pages gray, and driver_settings to None.
- DOCX text boxes, rectangles, rounded rectangles and ellipses are now
written in mc:AlternateContent with a VML fallback that repeats the text
box's text. Two tests that counted w:txbxContent elements, or the story
text, now count the fallback copy as well.
* Printing: the isolated print helper keeps the job's grey pages and driver settings
The Windows print helper process rebuilt each job with grey_pages off and no
driver settings, whatever the job carried. Its request now carries both: the
driver settings travel as the printer's name and the DEVMODE in hex, and
damaged settings are an error. The request file may now be up to 2 MiB larger,
the size of the largest driver settings craft-print accepts, written as hex.
Comments in Cargo.toml and apps/wordcraft/Cargo.toml now describe the shared
craft-libs commit, and the shared-story text box test says where its two copies
are written.
* DOCX: open picture frame shapes and keep chart formatting from craft-libs
At this craft-libs commit the DOCX reader returns a picture frame shape
(`frame` preset) as its own shape kind, and charts carry series formatting
and axis settings. WordCraft's model had neither:
- A document with a picture frame shape failed to open with "unknown
variant `frame`". The model bridge now reads it as a rectangle, as the
earlier reader did.
- The chart model drops nothing the shared chart model holds: series fill,
line width, line and fill off, markers, smooth lines, data labels and
number format, and the category and value axes. Before, saving a chart
with any of these wrote the chart again without them.
- A new scatter series is drawn as markers without a line, as before.
Change Chart Type sets this when a chart becomes a scatter chart or stops
being one, Edit Data keeps each replaced series' formatting, and Data
Labels replaces each series' own label setting.
* Charts: draw turned axis titles and keep stored scatter charts without lines
At this craft-libs commit a chart's vertical axis title is a text item
turned -90°. WordCraft's graphic text item now carries that angle, and the
text is laid out along its box and drawn turned about the box's center.
Scatter series saved in a .json document or a recovery snapshot before
series formatting existed have no `noLine` value. They now read as markers
without a line, as they were drawn when saved.
* Charts: draw opened ODT scatter charts without lines
The ODF reader at this craft-libs commit does not read a scatter chart's
line setting, so a scatter chart saved as ODT and opened again was drawn
with lines between its points. The ODF writer writes every scatter series
as markers without a line, and the opened chart is now drawn that way.
* Charts: set scatter series to markers only for opened ODF files alone
Opened ODT, OTT and FODT files set their scatter series to markers
without a line, since the ODF reader does not read a series' line
setting. Other formats that go through the same import path keep their
series as read. A series that arrives with its markers turned off gets
them back, as Change Chart Type does, so it is still drawn.
The test for an opened scatter chart now also covers flat ODT, checks
the drawn items against the markers-only drawing, and checks that the
chart's paragraph is still written as read.
* Dependencies: take craft-libs main at 453b0da782
Every craft-libs dependency, and the craft-proof note in Cargo.toml,
moves from 3af2280ee3 to 453b0da782. Cargo.lock adds craft-dds, which
craft-image-codecs now uses; no crates.io version changes.
- craft-xls builds its test fixtures only for tests and its
test-support feature, and they return a Result. wordcraft-formats
gets a test-support feature that turns it on; sheet::xls_fixture is
behind it and returns Result, and wordcraft-engine's tests enable it.
- craft_metafile::Picture has new report fields; the render tests'
literals fill them with Default.
- The docx tests follow the writer: the font table is kept as read,
the flat OPC comparison allows a kept part without its XML
declaration, and the bibliography store is related from the main
part, once, after a second save too.
* DOCX: gutter position Top is kept when a document is opened and saved
craft-libs now reads w:gutterAtTop into its settings model instead of
keeping it as unread XML, and WordCraft's settings had no field for it,
so opening and saving a document dropped the setting. Settings gets
gutter_at_top (off by default), which the document bridge carries both
ways. Layout still puts the gutter on the left.
* Charts: Change Chart Type gives a pie chart's value axis the new type's gridlines
A pie or doughnut chart keeps a plain value axis (no gridlines, axis
line on), and a new chart of any other type has gridlines and no axis
line. Change Chart Type kept the old axis, so a pie chart changed to a
column chart was drawn and saved without gridlines and with an axis
line. Change Chart Type between a round chart and another type now sets
the value axis to the new type's when it is still the old type's; an
axis that was changed stays as it is.
The progress log gets a line for the chart formatting, turned axis
titles, picture frame shapes and gutter position this branch brings.
The gutter_at_top doc comment states only what the field holds.