Commit Graph
2702 Commits
Author SHA1 Message Date
aiongg c26d0bacbe Integration: Japanese entries for the Tabs strings
#343 adds its twelve Tabs strings to the shared table; next's ja.rs (#272) keeps a row for every
shared key. The rows carry over the shared table's Japanese column, so lookups are unchanged.
2026-10-10 14:22:35 +00:00
aiongg 944ef17f62 Integration: German entries for the Tabs strings
#343 adds its twelve Tabs strings to the shared table; next's de.rs (#311) keeps a row for every
shared key. The rows carry over the shared table's German column, so lookups are unchanged.
2026-10-10 14:22:35 +00:00
aiongg 33a26228f5 Merge #343: Tabs: commands, Tabs panel and a Tabs section in Paragraph Style Options
Conflict: ROADMAP.md: both lines kept (next's IDML1 line, then the Tabs panel line)
Conflict: crates/engine/src/cmd/mod.rs: both spec lists kept (thread::specs, then tabs::specs)
Conflict: crates/ui-egui/src/dialogs.rs: next's delete_paragraph_style and the PR's style_tabs both kept, without the section_list doc comment that next removed; in the tests the PR's copies of draw, ruled_paragraph, undo_steps, the rule tests, command_app, the generic command tests and the text frame options test duplicated next's identical ones and were dropped, keeping only the PR's new Tabs section test
Conflict: crates/ui-egui/src/i18n/it.rs: both blocks kept (next's machine-translated rows, then the Tabs rows)
Conflict: crates/ui-egui/src/i18n/uk.rs: both blocks kept (next's machine-translated rows, then the Tabs rows)
2026-10-10 14:22:16 +00:00
moppeeerandClaude Opus 5.5 d361d84e38 fix(ui): Highlight swatch list rows and keep panels clear of scroll bars
Swatch lists (Character panel, Properties, task bar) shaded the row under
the pointer with the theme's hover grey, a few levels from the popup's
own background, so it looked as if nothing changed. The row under the
pointer is now white on blue, like a menu; the current swatch keeps its
shading. The lists also grow to fit their longest name, and their rows
stop short of the scroll bar that floats over the list's edge, so names
like C=15 M=100 Y=100 K=0 are no longer cut by it. The four copies of
the list are one shared function now.

The Glyphs panel counted its columns from the panel's whole width, so
the last column ran under the floating scroll bar and was cut off; the
columns now leave the bar room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:18:48 +02:00
aiongg ea3f11b9b7 UI: Tabs section in Paragraph Style Options
The style's stops on the same ruler and fields as the Tabs panel, with
Clear All, applied with the other edits on OK.
2026-10-10 14:17:58 +00:00
aiongg 2e3d954f5b UI: Tabs panel with a ruler over the text column
Type › Tabs (Cmd+Shift+T) floats a Tabs panel: alignment buttons, X,
Leader and Align On fields, and a ruler where a click adds a stop, a
drag moves it and dragging it off the ruler deletes it. The triangles
on the ruler drag the first-line, left and right indents. The panel
menu has Clear All, Delete Tab, Repeat Tab and Reset Indents. The panel
opens above the selected horizontal text frame with the ruler at the
view's zoom over the column; the magnet button places it there again.
2026-10-10 14:17:58 +00:00
aiongg 0f94bbb1ac Text: commands to add, move, change, delete, clear and repeat tab stops
type.tabs.* edit the stops of the selected paragraphs or, with a style
parameter, of a paragraph style. Positions are finite and clamped, a
paragraph holds at most 100 stops, leaders up to 8 characters and the
align-on character is one character. type.tabs.get reports the stops,
indents and the text column they are measured in.
2026-10-10 14:05:09 +00:00
moppeeerandClaude Opus 5.5 9c683f3ef8 feat(ui): Lay out Numbering & Section Options like InDesign's
Layout > Numbering & Section Options now opens its own window instead of
the generated command form, on the section of the page in view: Start
Section (always on for page 1), Automatic Page Numbering or Start Page
Numbering at, and a Page Numbering group with Section Prefix, Style,
Section Marker and Include Prefix when Numbering Pages; then Document
Chapter Numbering with its style, Automatic Chapter Numbering, Start
Chapter Numbering at, Same as Previous Document in the Book (only in a
book) and the book's name. OK and Cancel sit beside the options, out of
the scrolling body.

OK runs layout.section and layout.chapterNumbering; a refused value
(a prefix over eight characters or with + or a comma, a start number
below 1) keeps the window open and changes nothing. Opening the window
reads the chapter numbering without running a command, so it doesn't
stop a Data Merge preview. New strings are translated (German, French,
Spanish, Japanese, Chinese, Italian).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:58:33 +02:00
aiongg d4a7cc33fe Merge #329: Fix help buttons disabled when on homepage 2026-10-10 13:50:55 +00:00
aiongg d1587fc354 Integration: German entry for Show CJK Features
#336 adds the Show CJK Features string to the shared table and the ja, ar, pt_br, it and uk tables; next's German table (#311) covers every key of those tables, so it gets a row too (machine translation, the shared table's German column).
2026-10-10 13:50:55 +00:00
aiongg 6286f7c0a5 Merge #336: UI: CJK features behind a preference that follows the interface language
Conflict: ROADMAP.md: next's Right-to-left and Interface language lines (IDML Kashidas, German and Japanese cover every catalog, Ukrainian covers every key) plus the PR's Show CJK Features line
Conflict: crates/ui-egui/src/lib.rs: the PR's cjk_features() before next's opens_as_document (with .indd/.indt and its doc comment)
2026-10-10 13:50:51 +00:00
aiongg 4fd3c0fcae UI: CJK features behind a preference that follows the interface language
Preferences > Type > Show CJK Features (cjkFeatures; unset follows the
interface language: on for Japanese, Chinese and Korean) hides the
CJK-only Type menu items (Tate-Chu-Yoko, Ruby, Kenten, Warichu) and the
Ruby Quick Apply entry. The commands, layout and IDML work either way.
2026-10-10 13:48:07 +00:00
moppeeerandClaude Opus 5.5 498e3d401c fix(engine): Keep section prefixes to InDesign's rules
A section prefix is at most eight characters and contains no plus or
comma (page references and ranges use them); `layout.section` refuses
others and leaves the section unchanged. Symbols, a footnote style,
no longer number pages. The parameter documentation lists the 01, 001
and 0001 styles, and a test pins the fields the generated dialogs read
from both numbering commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:39:38 +02:00
moppeeerandClaude Opus 5.5 f061be9b3c feat(engine): Document chapter numbering
A document's chapter number now has a style (1, I, i, A, a, 01, 001,
0001) and a source, as in Numbering & Section Options > Document
Chapter Numbering: Automatic Chapter Numbering (one more than the
previous document in the book; 1 first), Start Chapter Numbering at,
or Same as Previous Document in the Book.

`layout.chapterNumbering {style?, start?, source?}` sets them (undoable)
and, with no parameters, reports them with the open book that holds the
document. The book's Update Numbering (`book.paginate`) resolves chapter
numbers in book order and reports them. Chapter Number variables and
cross-reference chapter numbers use the style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:39:33 +02:00
aiongg bb4fd03f7e Merge #319: DTD: memoize content-model matching, let entity names be any length 2026-10-10 13:19:59 +00:00
aiongg 3692eba3c4 Integration: fonts match a face's own style name before other faces' aliases (#126)
Static families such as Alexandria name every weight's legacy family
"Alexandria <Weight>" with subfamily "Regular". Matching names and aliases in
one pass let the first such face (Black) answer for Regular, so text set in
Regular came out in Black, wider, and pushed lines into overset.

(cherry picked from commit 681a3ec499834b866dd18244e5b25b425c682b10)
2026-10-10 13:19:53 +00:00
aiongg 9a0e26a6a1 Merge #331: Compose: page numbers take the Digits setting of their text
Conflict: crates/compose/src/shape.rs: next's shape_segment call with `styles`; added the PR's comment and digit mapping of the page name before it
2026-10-10 13:19:50 +00:00
aiongg 1abb74da0f Merge #330: Compose: the CJK leading model and character alignment apply only under the Japanese composers 2026-10-10 13:18:52 +00:00
Michał Kosior crqch 371bd15dc5 Fix help buttons disabled when on homepage 2026-10-10 15:15:57 +02:00
moppeeerandClaude Opus 5.5 651ef6aec2 feat(ui): Lay out the New Document window like InDesign's
File > New > Document now shows Recent, Saved, Print, Web and Mobile
tabs of page cards (drawn to the preset's proportions; double-click
creates) beside the preset's details: document name, width and height
with arrows, units, orientation, pages, start page #, facing pages,
primary text frame, columns and gutter, and collapsible margins and
bleed and slug per edge with link toggles. Save Document Preset keeps
presets by name; documents made are remembered for the Recent tab.
Small windows stack the details above the presets and scroll; the
layout mirrors for right-to-left languages. New strings go through the
translation tables (Italian, German, French, Spanish, Japanese, Chinese).

file.new takes intent, units, startPage and per-edge bleed and slug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:53:51 +02:00
Ikki NishiharaandClaude Sonnet 5.5 a46da6eff0 DTD: memoize content-model matching, let entity names be any length
Nested repetitions such as ((a)*)* asked the group below for the same end
positions again and again, which is exponential in their depth: remember
the positions of a group per start position while one element's children
are matched. The search for the closing semicolon of a parameter-entity
reference had a 256-byte window, so a longer name was left unexpanded
without an error: stop the search at whitespace or the next percent sign
instead, which keeps a round linear and puts no limit on the name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 21:10:16 +09:00
aiongg 5dc8383a50 Compose: apply the CJK leading model and character alignment only under the Japanese composers
Every IDML root style carries LeadingModelAkiBelow and AlignEmCenter, but only
the Japanese composers (HL Composer J, HL Single J) use them; the Adobe and
World-Ready composers set lines baseline to baseline with every character on
the Roman baseline. Applying them everywhere moved lines down after a size
change and lowered smaller-em glyphs, pushing the last lines of tight frames
(and whole keep-together paragraphs) into overset.

Composer gains Japanese and JapaneseSingleLine, read from and written to IDML;
the composer choice in the UI keeps the kind.
2026-10-10 11:56:45 +00:00
aiongg e6428d2111 Compose: page numbers take the Digits setting of their text
Automatic page numbers (and section markers) were set from the page name as
typed, so a page number in Hindi Digits text drew Western digits, which an
Arabic-only font shows as missing-glyph boxes. They now map their digits like
typed text does.
2026-10-10 11:55:28 +00:00
aiongg 7d39f0061c Integration: #305's reopen tests read legacy JSON as format 1 (#83)
#83 adds native format 2 and an upgrade that pins Keep Lines Together and Align Left Edge where a format-1 style chain leaves them unset. #305's tests save the same document as native ZIP and as legacy JSON (format 1) and compared both as whole documents. The base style now sets both attributes, and only the native ZIP is compared as a whole document; the nullable resolution is checked for both.
2026-10-10 11:13:49 +00:00
Philipp Krüger 377fc3f3eb Merge branch 'main' into feat/pptx-export 2026-10-10 13:11:34 +02:00
aiongg 89ea36eb6c Merge #305: Preserve explicit nullable text defaults when reopening documents
Conflict: ROADMAP.md: both QA1 lines (#315, #305)
2026-10-10 11:09:24 +00:00
aiongg 9a047d7f3e Merge #83 (771bbaf): Fonts: cap height and x-height from glyph outlines when a font doesn't declare them 2026-10-10 10:57:51 +00:00
aionggandSean Hammond 771bbafb82 Fonts: cap height and x-height from glyph outlines when a font doesn't declare them
When OS/2 has no usable sCapHeight / sxHeight, the face measures them from the
unhinted outlines of flat-topped letters (H I E T for cap height, x z v for
x-height) at the face's variation location, and falls back to a share of the
ascent only when none of those letters has a plausible outline. Measuring
outlines instead of the glyf bounding box also covers CFF and variable fonts.

Based on seanth's measurement in #292.

Co-authored-by: Sean Hammond <sean.hammond@und.edu>
2026-10-10 10:54:35 +00:00
aiongg aaff49833c Merge #317: Text: combining marks that start a run are shaped with their base letter
Conflict: crates/compose/src/shape.rs: #317's marks_join_their_base runs on the resolved runs before #81's piece grouping
2026-10-10 10:46:05 +00:00
aiongg 978a95f58e Text: combining marks that start a run are shaped with their base letter
A run that begins with combining marks, after a run that differs only in
OpenType features (ligatures, kerning, OTF features), now gives those marks
to the run before it. The shaper attaches each mark to its base, and a
missing font's fallback draws the mark in the same face as its letter
instead of the substitute's missing-glyph box. Runs in another font, size
or colour keep their marks.
2026-10-10 10:33:42 +00:00
Ikki NishiharaandClaude Sonnet 5.5 794d601471 DTD: bound parameter-entity expansion, nesting and sequence matching
Parameter entities were expanded by up to eight rounds of text.replace
per entity over the whole text, so a few hundred bytes of DTD grew
exponentially and a large one cost entities x length per round. Expand
them one scan per round with a map, bound the result and the depth, and
refuse cycles. Content-model groups recursed once per parenthesis with
no limit (a stack overflow), and the positions after each item of a
sequence were kept as a list of paths (2^n for n optional items): limit
the nesting and keep the positions a set.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 19:23:53 +09:00
aiongg f8be188192 Integration: German row for the fill and stroke message as #81/#84 word it
#311's de.rs translates "Select an object to color its fill or stroke."; #81/#84 on next say "Select an object or text to color its fill or stroke.", so the German interface showed it in English. The row takes the new key.
2026-10-10 10:14:57 +00:00
aiongg 4a49cdcaf9 Merge #311: i18n: translate the whole interface into German
Conflict: ROADMAP.md: next's right-to-left and interface-language lines, with #311's sentence that German and Japanese cover every key.
2026-10-10 10:12:50 +00:00
aiongg 7b8b505083 Merge #315: Retry missing font fallbacks after a font rescan 2026-10-10 10:12:35 +00:00
aiongg d86bbd8d6c Merge #316: GREP: the dialect's classes and metacharacters (\l \u \h, ~ codes, lookaround) in GREP styles and Find/Change
Conflict: crates/compose/src/tests.rs: tests only, both (#310's tight word spacing test, #316's GREP style test)
#316's overlay test calls overlays() with the drop_end argument next added (#83).
2026-10-10 10:12:34 +00:00
aiongg f4c0b9f378 GREP: dialect classes and metacharacters (\l \u \h, ~ codes) in GREP styles and Find/Change
One shared compiler (designcraft_compose::grep) translates the GREP dialect
documents and users write: \l \u \L \U letter classes, \h \H \v \V \R \N,
\r paragraph end and \n forced line break, ~ special-character codes,
Unicode-aware POSIX classes, and literal [ & -- inside character classes.
It compiles with fancy-regex, so lookahead, lookbehind, atomic groups,
possessive quantifiers, backreferences and \K work; a backtrack limit stops
pathological patterns with an error.

GREP styles skip a pattern that fails to compile or gives up on a search,
with one log warning. Find/Change returns the error. The paragraph style
dialog validates with the same compiler. Fixes en dash (~=) mapping to an
em dash in Find/Change.
2026-10-10 09:58:12 +00:00
sanyamsingh001andCodex 10e18bac27 QA1: retry missing font fallbacks after a rescan
Co-Authored-By: Codex <codex@openai.com>
2026-10-10 19:53:22 +10:00
aiongg f08899832b Merge #309: Snap: smart guides beat the baseline grid; a box centres between two others
Conflict: crates/tools/src/snap.rs: first_on_axis: a guide or margin in reach competes with the baseline grid through #84's nearer(); otherwise #309's smart-guide passes run and the baseline grid comes last. #84's nearer_of_margin_and_baseline_wins and #309's tests pass.
2026-10-10 09:29:32 +00:00
aiongg db0b16ac39 Merge #308: fix(geom): correct pica and cicero rounding at unit boundaries 2026-10-10 09:28:29 +00:00
aiongg 3b490188cf Merge #307: fix(layout): reject invalid spread rotation angles 2026-10-10 09:28:29 +00:00
aiongg 61483f8b66 Merge #306: fix(geom): prevent invalid zoom values from breaking ruler ticks 2026-10-10 09:28:28 +00:00
aiongg 2f15a954bf Integration: deleting a style points every use at its replacement
#171's style.character.delete (and the style.paragraph.delete it copies) reassigned only text runs;
next's rename_style already rewrites styles, stories, table cells, nested and GREP styles and
footnotes. Both deletes now go through one delete_style that removes the style, rebases its
children and calls rename_style, in one undo step.

- Children of the deleted style are based on the replacement ([None] and [No Paragraph Style]
  clear Based On); when the replacement descends from the deleted style they take its parent,
  so no based-on chain loops.
- rename_style also covers drop cap styles, cell styles' paragraph style, footnote and endnote
  paragraph styles, the endnote heading style, TOC entries and the default paragraph and
  character styles, which fixes renames too.
- A missing, empty, unknown or built-in name, an unknown replacement and a replacement equal to
  the deleted style are errors that change nothing.
2026-10-10 09:27:53 +00:00
dwetscherandClaude Opus 5.5 14b506c373 i18n: translate the whole interface into German
A German table (crates/ui-egui/src/i18n/de.rs) covers every key of the shared,
Japanese, Arabic, Brazilian Portuguese, Italian and Ukrainian catalogs (1,697
rows; before, 164 strings were German). The shared table's German column stays
the fallback for keys added after it. Tests check placeholders, padding, colons
and ellipses against the English source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 11:27:50 +02:00
aiongg 2fb7ddafe2 Merge #171: Paragraph and Character Styles: wire save and delete into the UI (#169)
Conflict: crates/engine/src/tests.rs: both sides append tests; kept next's then #171's
2026-10-10 09:19:37 +00:00
aiongg f977482e06 Merge #310: Justification: tight word spacing doesn't isolate a word; fixed-width spaces don't stretch
Conflict: crates/compose/src/breaker.rs: next's multi-line Item::boxed/penalty with edge_elastic and start_elastic plus #310's over; glue in items() keeps next's edge_elastic and sets #310's over; kp_pass first node keeps next's first_box/first_hang/first_elastic and ty/tz plus #310's to
2026-10-10 09:18:18 +00:00
aiongg 11eac68fda Merge upstream main 92649ff (#155) into next 2026-10-10 09:15:04 +00:00
noah1400andClaude Opus 5.5 8b940b4bcb Snap: smart guides beat the baseline grid; a box centres between two others
On the vertical axis the baseline grid was tried before smart guides.
It snaps while hidden, and with lines every 12 pt and a box's top,
centre and bottom each reaching 4 pt either side, one of them is nearly
always in the zone. It took almost every vertical move and drew nothing,
so object alignment and equal spacing hardly ever showed on y. The
baseline pass now runs after the smart guide passes.

Smart spacing also only matched a gap between two other boxes. A box
dragged between two neighbours now snaps to where both of its gaps are
equal, and both gaps are marked.

Fixes #188

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N5fQBTFb4hhKXsCFYitZ1P
2026-10-10 09:06:48 +00:00
aiongg 40c3a78e6e Compose: fixed-width spaces keep their width on justified lines
Stretch past the maximum word spacing was shared by every space on the
line, so em, en and thin spaces widened along with word spaces. Only word
spaces take it now; a line without word spaces gives it to its letter
gaps, matching how the paragraph composer rates such a line.
2026-10-10 09:05:06 +00:00
aiongg be7a367050 Compose: a tight word-spacing range no longer isolates a word on a justified line
Stretch past the maximum word spacing was rated in units of the word
spaces' own stretch. With a narrow range (100-105%) that unit is tiny, so
a loose line with several word spaces rated far worse than a single word
letter-spaced across the measure, and the paragraph composer chose the
single word. Rate the overflow in units of at least a third of the word
spaces' width (the default range), so word spaces take the extra stretch.
2026-10-10 09:01:14 +00:00
Nigel Ihza Firdausy 5ea407daf6 Merge latest upstream main into ruler zoom fix
Include unrelated upstream application changes without rewriting the
contribution commit; ruler zoom changes remain isolated.
2026-10-10 15:55:18 +07:00