- Render each shape cache clipped to its own bounds instead of the full
page clip.
- Copy embedded font bytes before locking the shared text engine and take
the lock per font, not for the whole registration loop.
- Track seen font content keys in a HashSet instead of scanning the font
list for every glyph; hash glyph text for fake-bold pairing instead of
cloning strings.
- Update the module and `pdf-editable` feature docs to describe text and
accepted no-op clips.
- Poll the cancellation watcher every 20 ms; Device callbacks only cover
paints, so a single long path still needs the watcher.
- Accept explicitly closed page-sized clip rectangles (m l l l l h).
- Pair fake-bold strokes through a text/font/order index instead of a
full scan, keeping the comparison cap and cancellation checks.
- Tests: solid zero-length stroke stays editable, explicit clip
rectangle.
- Count actual fake-bold comparisons toward the cap instead of the
product of glyph and stroke counts.
- Fall back for any dashed zero-length subpath (open or closed); test
covers a stroked line followed by a closed point.
- Handle invisible glyphs before the soft-mask check so hidden text
does not rasterise the page.
- Bound fake-bold glyph/stroke pairing by comparison count and check
cancellation during the scan.
- Keep both knots when a closing curve returns to its start; fall back
for a dashed single-point subpath.
- Skip inkless runs (zero-width/format characters) instead of treating
an empty cache as a render failure.
- Track soft masks and reject the page only when paint happens while one
is active.
- Tests: fake-bold mismatch across a path, closing curve loop.
- A text cache that renders empty now falls back the page instead of
leaving blank text.
- Fake-bold strokes pair only with fill glyphs at the same paint order.
- Retain single-point closed subpaths (round-cap dots) without emitting
duplicate phantom points; test added.
- Device methods documented; paint-order test covers text on both sides
of a path.
- Colours: AlphaColor components are straight, not premultiplied; use
them directly instead of dividing by alpha (the opacity test now
checks RGB, not just alpha).
- Text: key families by font content key, not PostScript name, so two
faces with one name cannot share a family. Keep text layers at the
path index where their glyphs were painted instead of appending them
after all paths.
- Correctness: reject bow-tie clip paths, start a new subpath after
close, fall back on unparseable/unsupported glyph mappings, truncated
content, failed font registration, and shape-cache budget exhaustion.
- Cancellation: check between text-cache renders as well as between
objects.
- Include Bezier control points in the cache-size estimate; cache the
content hash per Hayro font identity.
- Docs: ImportOptions/CLI help now describe editable text and the
embedded-font caveat. Tests: text cache is not blank, paint order,
bow-tie clip, line after close, cancellation between objects.
- Always suffix an embedded face's alias with a hash of its bytes, so the
same PostScript name from different documents cannot collide in the
process-wide shared engine; a face imported twice reuses its entry.
Registration is skipped when the alias or an installed full family is
already present.
- Release the shared text engine lock between layers so a text-heavy
import does not block the UI's layout for the whole cache loop.
- Test: two documents with one font name but different bytes get
distinct aliases and both families are present in the shared engine.
- Register imported fonts in photocraft_text::shared() so the app can
re-lay text after edits or DPI changes. Prefer an installed full
family, and register an embedded face under its PostScript name
(key-suffixed when two faces share it) so a subset cannot shadow it.
- Warn that text using PDF-embedded fonts may change font when edited or
reopened; the document format does not carry the bytes yet.
- Reject mirrored text and b == -c matrices; scale the tolerance by the
em size so 90-degree text stays editable. Tests for rotated and
mirrored text.
- Use pdfcer's 0.30 em line tolerance.
- Text: build one TextLayer per line/style run from the Device's glyph
draws. Derive the family from the PostScript name (subset tag, style
suffix, MT/PS, camel spacing); italic from the font flags/attributes
or name; bold from the weight or name; pair fill+stroke glyphs as fake
bold (Tr 2/6) instead of a second run.
- Require an embedded font with a PostScript name; standard-14/Type 1
substitutes and Type 3 text fall back to the raster page.
- Register embedded font bytes in the text engine, use the family the
font reports, and render text caches on import. Tests compare the
text composite with the raster page.
- Review fixes: accept a page-sized no-op clip; draw zero-width strokes
as 1 px hairlines and use 1 px as the dash base; reject non-uniform
stroke transforms; repeat odd dash arrays and keep zero dashes;
ExtGState ca/CA already reach the colour alpha (tested); note that
catch_unwind only guards unwinding profiles.
Add an experimental, opt-in PDF path importer on craft-pdf's interpret
Device. Fills and strokes become ShapeLayers in document pixels with
their real colours, widths and dash patterns; text, images, clipping
paths, transparency groups, patterns, soft masks and annotations keep
the raster page with a warning, so a page is never half imported.
- ImportOptions::pdf_editable (off by default) and --pdf-editable.
- pdf-editable Cargo feature in photocraft-io; the CLI enables it.
- Shape caches are rendered within a 256 MiB page budget.
- Cancellation is forwarded through a 5 ms watcher; hostile pages are
caught and fall back instead of panicking.
Tests cover fill/stroke colours and dashes, composite parity with the
raster page, text fallback and cancellation.
Raise the synthetic page to a million strokes so the 45 ms watcher
threshold keeps a wide margin on an optimised test build, and record why
the importer keeps one RenderCache per page.
- render_page: forward Interrupt to craft-pdf through an owned flag and a
scoped 5 ms watcher, so dense vector pages stop mid-render.
- Warn when craft-pdf reports a substituted font (the backend does not emit
the flag yet).
- /PageLabels: emit an entry for every page, start at 0, and write no tree
when every artboard name is empty.
- Export budget: charge retained page data plus the largest page's two f32
buffers instead of the whole document canvas, saturating on overflow.
- Render each artboard from a document holding only its group, so
overlapping boards no longer paint on each other's pages. One document
shell is cloned and reused.
- Tests: dense-page cancellation, labels with an empty middle name and all
empty, overlapping artboard pixels, sparse 9000x9000 canvas, seven US
Letter pages.
The Color Sampler menu kept only the sampler's index. If a control
command deleted an earlier sampler while the menu was open, the index
named another sampler and Delete removed that one. The menu now also
remembers the active document and the sampler's position; when either
no longer matches, Delete greys out and the menu closes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts with main's --no-maximize-compatibility (#8064) in the CLI
export args, output mapping and dev-dependencies, and in the
file-format parity status line and revision history: both sides kept.
Co-Authored-By: ljkx <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Importing an .abr with select picked its first brush without the 1 %
opacity floor, so a preset saved at 0 % showed 1 % but painted nothing
(#11812).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A brush remembered at 0 % opacity (saved before the 1 % floor) read back
at 0: the options bar showed 1 % but strokes painted nothing. Restoring
now floors opacity at 1 %, like tools.setBrush (#11812).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#9970 reopened Image > Adjustments > Photo Filter... at the filter, colour,
density and Preserve Luminosity of its last OK. Measured in the reference
application: after OK at 60, 70 and 74 %, with a preset or with Color and a
custom colour, it reopens every time at Warming Filter (85), the orange
swatch and 25 %; only Preserve Luminosity carries over (off after an OK with
it off, on after an OK with it on). Opening now starts from the neutral
settings and takes just that one value from the last OK; Alt still reopens
at all the last settings (#8900). Tests and the ui-parity row follow the
measured behaviour.
Co-Authored-By: ljkx <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The typed-text draft remembers the setting it was stored with and is only
used while that setting is unchanged, so a value set meanwhile (a tool
preset while the options bar was hidden) shows from the first frame.
Co-Authored-By: Claude Opus 5.5 <[email protected]>