A placement of a multi-page PDF carried no page number through IDML: graphic()
always made the asset with page 0 and keyed linked_assets by path alone, so
every placement of one file showed page 1 (InDesign's PDFAttribute PageNumber
was ignored). Import now reads PDFAttribute/@PageNumber (1-based) into
Asset.page, linked_assets is keyed by (path, page), and export writes
PDFAttribute back for pages past the first.
Regression test: the same file placed at pages 2, 1 and 2 imports as two
assets with pages 1 and 0 and round-trips through export.
Measured in Zero2Graphic's video: InDesign's placeholder paragraphs run 5,
10 (at 18 pt), 6 and 8 lines in a 5.9 cm column, about 2, 2, 3 and 3 of
DesignCraft's filler sentences. The rhythm started 3, 4, 2, 5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The panel was a row of text buttons (Add, Subtract, …, Make Compound,
Release). InDesign's has four rows of icon buttons: Paths (Join, Open,
Close, Reverse), Pathfinder, Convert Shape and Convert Point. The icons are
new drawings in icons.rs. Two engine commands back the rows that had none:
path.join (close an open path, or join two open paths at their nearest
ends) and path.convertPoints (plain, corner, smooth, symmetrical, on the
selected points or whole paths).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`math.svg` and `math.insert` take an unbounded `latex` string, and the parser's
arg/atom/list/list_until_right recursive descent recursed once per group: 100k
nested braces, `\frac`s or `\left(`s overflowed the stack (an abort the command
guard cannot catch). Past MAX_NESTING (256) groups stop descending, so the rest
of the input is consumed iteratively.
Regression test: 100k nested braces, `\frac`s and `\left(`s typeset to an SVG;
the old code aborted with a stack overflow.
InDesign's placeholder text comes in paragraphs; Zero2Graphic's magazine
tutorial styles its second paragraph as an 18 pt lead (2:16). DesignCraft
filled the frame with one paragraph, and the last filler sentence ran into
the first ("interit.Ovid"). Paragraphs now hold 2 to 5 sentences, and an
overset fill is trimmed to the last whole sentence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
InDesign's Pathfinder result takes the attributes (and content) of the
frontmost object, except Subtract, which keeps the backmost. DesignCraft
kept the backmost for every op but Minus Back, so a photo placed over
strips and intersected with them was deleted and the black strips stayed
(Zero2Graphic's magazine tutorial, 7:19).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found while testing crates/doc/src/build.rs:377 (Document::insert_pages), called from crates/engine/src/cmd/layout.rs:91
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Conflicts in dialogs.rs: main's set_field kept (Dialog::s made pub(crate) for
new_document.rs), #325's New Document body re-seated in main's dispatch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Selecting an empty paragraph (a blank line) puts a collapsed caret on its
hidden paragraph mark, the only character on that line. Previously
type.char either deferred the formatting to the next typed character (in
a non-empty story) or dropped it on the floor for composition, so there
was no way to change a blank line's height — matching InDesign's ability
to select the pilcrow and adjust leading.
- engine/cmd/text.rs: recognize an empty paragraph's own caret position
(empty_para_mark) and apply character attributes straight to that
byte's run instead of deferring to typing format.
- compose/lib.rs: an empty paragraph has no glyphs of its own, so resolve
the hidden mark's run (if overridden) for the paragraph's base leading
instead of always falling back to the paragraph's plain default.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
delete_para and delete_char previously reassigned only the story text
runs/paragraphs using the deleted style, leaving other styles' Based
On, paragraph styles' nested/nested-line/GREP style refs, the drop cap
style, and the footnote reference style pointed at a name that no
longer exists.
Extract redirect_style_refs() from rename_style() (everything it does
except updating the registry entry's own name) and reuse it from both
delete commands, so deleting a style now redirects every reference
type to the replacement style before removing the registry entry.
Also teach rename_char_refs() about drop_cap_style, which it missed
even for renames.
Add validation: name must be non-empty and refer to an existing
style, and replaceWith (if given) must refer to an existing style and
can't be the style being deleted.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
InDesign's Preferences › Appearance of Black defaults to Display All
Blacks as Rich Black on screen, so [Black] text and strokes look pure
black (RGB 0,0,0), as in Adobe's magazine-layout tutorial. DesignCraft
defaulted to Display All Blacks Accurately (#343334). Settings saved
with an explicit choice keep it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Margins sit in Top/Bottom and Inside/Outside pairs (Left/Right on a
non-facing document) with a link button between them that makes all four
the same; Columns has Number and Gutter. Create Guides puts Rows and
Columns side by side, with Fit Guides to Margins/Page and Remove Existing
Ruler Guides under Options. Both have a Preview checkbox that previews the
change through a session interaction (one undo step on OK, nothing on
Cancel), and a measurement field works out arithmetic when it loses focus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The object's name turns into a field: Enter or a click elsewhere renames it
(object.rename), Esc leaves it as it was, and renaming to nothing goes back
to the automatic label. Layer rows keep double-click for Layer Options
(#416).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adobe's "Set up a modern magazine layout" (Brian Wood, 2:12–4:23) locks a
page frame drawn round the spread (Cmd+L), then draws the text frames on
top of it with the Type tool. In DesignCraft the press landed in the
locked frame, which the Type tool turned into a text frame, putting the
caret in it; no new frame was drawn.
- The Type tool takes a hit only on text frames (locked or not, as
InDesign lets you edit their text) and unlocked empty frames; over a
locked empty frame, the press starts a new text frame.
- text.placeCaret refuses to convert a locked empty frame (or one on a
locked layer).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file dropped on the window is placed on the spread under the pointer,
or the spread under the view centre when the pointer isn't over the
canvas, a parent spread included while parents are being edited: a
graphic's top left goes to that point, text into a new frame on the
document page there. Before, every dropped file went to the first
spread.
Georgian is a Properties text language (IDML "Georgian" maps to ka). Georgian has no initial capitals: Mtavruli is only for all-caps text, so Change Case title and sentence case and index section heads leave Mkhedruli as it is (doc::capitalizes); upper case still gives Mtavruli.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF
Adds i18n/ka.rs (1,734 entries: every key of the shared, Arabic, Brazilian Portuguese, Japanese, Italian and Ukrainian tables, plus labels only the code and command table use), registered as ქართული in LANGUAGES and the Interface Language menu. Count captions use the category-first form Ukrainian already uses (გვერდი: 5), since Georgian nouns stay singular after a numeral. Tests: every Georgian key resolves, placeholders and ellipses are preserved, no Mtavruli, every menu title, item and submenu is translated, and switching to ka renders. Docs: localization-parity.md and ROADMAP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF
DesignCraft's RPM requires Fedora package names: `libxkbcommon`, `(vulkan-loader or libglvnd-egl)`.
openSUSE has no `libxkbcommon`, `vulkan-loader` or `libglvnd-egl` package, so zypper refuses it with
`nothing provides 'libxkbcommon'` (exit 4, which the ArtCraft Launcher shows as "error 4";
storytold/craft-launcher#341).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chris Nielsen's "The Adobe InDesign Toolbox" (InDesign 2020) walks the
Tools panel in one and two columns. Compared with it:
- Gradient Swatch and Gradient Feather are separate tools (one flyout
here before).
- In two columns InDesign lays out Content Collector and Content Placer,
Apply Color / Apply Gradient / Apply None and Normal / Preview (with
Bleed, Slug, Presentation in its flyout) side by side
(SPLIT_IN_TWO_COLUMNS). One column keeps one well with a flyout, which
now names what is in front (Apply Color, Apply Gradient or Apply None).
- The utility button is View Options: Frame Edges, Rulers, Guides, Smart
Guides, Baseline Grid and Hidden Characters, checked when shown, with
their shortcuts (17:40). It was Text Frame Options (Object › Text Frame
Options…, ⌘B, still opens it).
- Apply Color (,) applies the colour applied last ([Black] at first) and
Apply Gradient (.) the gradient applied last, else the document's first,
else white to black (InDesign's default), to the fill or stroke in front.
The flyout had Apply Color as [Black] and no Apply Gradient.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tool cursors are glyphs drawn in code (black ink, white halo): the filled
arrow for Selection, the hollow arrow for Direct Selection, the pen nib
with an add, delete, close or convert badge, and a curved double arrow
for rotating. Linux and Windows show them as OS cursor bitmaps,
rasterized per pixels-per-point and cached; macOS paints them at the
pointer, since it sizes cursor bitmaps in points; the web build keeps
the system cursors. Text, hand, zoom and resize cursors stay system
cursors.
The Pen tool reports what a click does: over the first anchor of the
path being drawn it closes the path, and between paths a click on a
selected path's anchor deletes it and a click on its outline adds one.
The Add, Delete and Convert Direction Point tools show the matching pen
badges.
The glyph geometry and the rasterizer are adapted from VectorCraft's
code-drawn tool cursors (same organisation, original work).
Fixes#438