Commit Graph
490 Commits
Author SHA1 Message Date
Dylan M. Taylor ad3b32fbf6 hyphenation: linear heuristic, cache misses outside the lock (#2185)
* hyphenation: linear heuristic, cache misses outside the lock

The syllable heuristic built each word suffix as a String to test it, which is
quadratic in the word's length; it now uses prefix sums of vowels and UTF-8
lengths. Mapping a word's break points to glyphs scanned the word for each
point; both are indexed once per word. A word not in the hyphenation cache is
worked out without holding the cache's global mutex.

* hyphenation: compare the word ending with ends_with
2026-11-03 11:07:41 -05:00
Dylan M. Taylor f1bdec7fee compose cache: compact neighbour signatures, resolve each anchored host once (#2186)
A cached story copied every wrap neighbour's whole signature and item list into
its entry; stories on one spread share its wrapping items, so entries grew with
all of theirs together. A neighbour's signature now goes in as its hash and its
items are kept once each.

Anchored-frame placement asked for the host's composition once per frame, and
again at every level a host was reached from. Each host is now asked for once
per placement pass, and the cache and the uncached path remember the hosts they
resolved for the whole traversal.
2026-11-03 07:05:57 -05:00
Dylan M. Taylor 386b600572 compose: index lookups that were quadratic in a paragraph, line or table (#2180)
- Footnote references on a line are deduplicated with a set instead of
  searching the references collected so far.
- Nested styles stream the paragraph up to their delimiter with one character
  of lookahead instead of copying the rest of the paragraph for each style,
  and a delimiter's characters are indexed once per style.
- Shaping resolves which nested/GREP style is on top with one sweep over the
  overlay boundaries instead of scanning every overlay for each stretch.
- Column rules group crossing lines by paragraph through an index.
- Table fragments index each row's top once instead of searching the rows
  for every cell.
2026-11-03 06:48:12 -05:00
Brandon Thomas f87f232724 Merge pull request #2169 from ljkx/indent-to-here
Text: Indent to Here indents the paragraph's later lines to the character (#2080)
2026-11-02 23:23:33 -05:00
ljkx 70a76b15c5 Text: test that a list number's Indent to Here wins over one in the drop cap (#2080)
The drop cap is set at the indent and the list number beside it, so the
number's character is the later one on the line and sets the indent.
Pin that with a test, and say so where the character is looked up.
2026-11-03 04:44:04 +01:00
ljkx 8013118a44 Text: Indent to Here in a drop cap or a list label indents the later lines too (#2080)
The character was looked up among the line's body glyphs, so one inside
the drop cap was missed, and one in a list number's ^i matched the first
body glyph (after the label's tab) instead of itself. Find it among the
placed glyphs, which include the drop cap's and the label's.
2026-11-03 03:53:41 +01:00
ljkx d0271a562f Text: Indent to Here beside a drop cap isn't indented by the drop cap again (#2080)
The lines after an Indent to Here start at the character, which already sits past the drop cap, but the lines beside the drop cap still added its width on top. They no longer do. Adds tests for the drop cap, for Indent to Here after a tab (the usual hanging number) and for a right-to-left paragraph, and documents how the indent behaves beside a text wrap.
2026-11-03 01:59:37 +01:00
NetterSilverandClaude Opus 5.5 b4c9cb7d3a Space dotted paragraph border dots evenly
Fixes #2175

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:24:50 +01:00
ljkx 7e3d0fe2f5 Text: Indent to Here indents the paragraph's later lines to the character (#2080)
The composer treated Indent to Here as an invisible zero-width character and nothing else, so inserting it changed nothing. A line holding one now sets the start-side indent of the paragraph's following lines to the character's position, and those lines are broken again with the narrower measure. The indent holds into the next columns and frames; a later Indent to Here in the paragraph replaces it.
2026-11-02 20:07:09 +01:00
Brandon Thomas 8064830e9b Merge remote-tracking branch 'origin/main' into fix-1147
# Conflicts:
#	crates/compose/Cargo.toml
#	crates/compose/src/hyphen.rs
#	docs/gaps.md
#	docs/localization-parity.md
#	docs/target-app-parity.md
#	docs/typography-parity.md
2026-11-01 14:39:07 -05:00
Youssef Azriouil f3f23718dc Dutch hyphenation: test long compound words 2026-11-01 17:26:45 +01:00
Brandon Thomas 74b9944ba3 Merge storytold/main into PR #1239 2026-10-31 01:01:49 -04:00
Brandon Thomas faa2bf5089 Merge storytold/main into PR #1239
# Conflicts:
#	crates/doc/src/xref.rs
2026-10-31 01:00:56 -04:00
Brandon Thomas 8ff43f55fc Merge storytold/main into PR #2057 2026-10-31 01:00:55 -04:00
aiongg 0565eaf380 Integration: #1461 drop cap box moves with vertical justification 2026-10-31 00:33:24 +00:00
aiongg b1d213ba6e Integration: #1566 hyphenation limits count the word after an elision 2026-10-31 00:32:54 +00:00
aiongg bdcce39e56 Integration: #1566 apostrophe elision only in French and Italian 2026-10-31 00:13:39 +00:00
aiongg 89ef0e3d81 Merge PR #1606: Paragraph Shading and Border pages
crates/ui-egui/src/panels/properties.rs, properties/object.rs: main's split module kept; preview_row and paint_corner_shape exported for the shading corner menus
crates/ui-egui/src/panels/properties/tests.rs: both sides' tests kept
crates/ui-egui/src/dialogs/tests.rs: main's tests kept; the border test uses the new corner labels; the shading layout test added
crates/ui-egui/src/i18n/*.rs: union of keys without duplicates
crates/ui-egui/src/dialogs.rs: the corner shape face uses corner_shape_button (no hard-coded colour in the dialog)
2026-10-30 23:17:40 +00:00
aiongg ad21d75988 Merge PR #1566: Hyphenation fr/it 2026-10-30 23:16:19 +00:00
aiongg cc80be16ab Integration: #1461 spacing-limit test checks every paragraph gap against the small limit 2026-10-30 23:16:19 +00:00
aiongg f2389b791c Merge PR #1461: Text Frame Options
crates/ui-egui/src/dialogs.rs: both dialog tests kept
crates/ui-egui/src/i18n/*.rs: union of keys
docs/target-app-parity.md: main's change line plus the Text Frame Options entry
2026-10-30 23:16:09 +00:00
aiongg b9f884f002 Find/Change: Change and Change/Find (PR #1498's own change on main's Find/Change)
Applied as the diff of #1497 to #1498's head; the older copy of #1496 is not taken.
crates/engine/src/cmd/find.rs: PR's found-text Change path; format_only keeps main's cleared-attributes case
crates/ui-egui/src/dialogs/tests.rs: main's tests kept, the PR's Change test added
crates/ui-egui/src/i18n/*.rs: union of keys
docs/target-app-parity.md: main's text plus the Change wording
2026-10-30 23:15:51 +00:00
moppeeer b71f83114f Merge remote-tracking branch 'origin/main' into hyphenation-french-italian
# Conflicts:
#	crates/compose/Cargo.toml
#	crates/compose/src/hyphen.rs
#	docs/gaps.md
#	docs/localization-parity.md
#	docs/typography-parity.md
2026-10-30 21:56:20 +01:00
moppeeer 1fd7cff87e Merge remote-tracking branch 'origin/main' into text-frame-options-layout
# Conflicts:
#	crates/compose/src/tests.rs
2026-10-30 21:53:55 +01:00
aiongg 92327dcc4c Merge track b: swatches, canvas, tools and tables PRs
Conflicts: engine/src/tests.rs and i18n/*.rs: adjacent additions from both sides, both kept.
2026-10-30 20:49:48 +00:00
aiongg 5d9594900f Merge PR #1041: Compose: test anchored objects pushed into a later frame 2026-10-30 19:44:36 +00:00
aiongg 19a8a7ae66 Merge PR #1463: Paragraph rules: Type, Gap Color and Tint, Keep In Frame
crates/ui-egui/src/dialogs/tests.rs: kept both sides' appended tests
2026-10-30 19:44:13 +00:00
Claude 26253e9da4 Parent pages: running headers show their name on the parent itself only
On a parent page a running-header variable shows <Name>, as InDesign shows it (it was blank). Text
with no page that isn't on a parent (a frame composition can't place on a page) keeps the
variable's text before and after: frames now record whether they are on a parent spread, and
the composed values are cached by page and parent.

Split from #1232 (parent-page-display), as asked in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-30 17:02:10 +00:00
Claude d48b650320 Merge storytold/main into xref-edited-text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa

# Conflicts:
#	ROADMAP.md
2026-10-30 16:36:59 +00:00
Brandon Thomas 56decd96e2 Merge storytold/main into PR #1990 2026-10-29 21:55:23 -04:00
Brandon Thomas e22e6038dd Merge storytold/main into PR #1990
# Conflicts:
#	docs/typography-parity.md
2026-10-29 21:53:38 -04:00
Brandon Thomas 8867f312e9 Merge storytold/main into PR #1972 2026-10-29 21:53:38 -04:00
Brandon Thomas f05a022cb9 Merge pull request #1254 from RoHaX/feat/german-2006-hyphenation
Add German 2006 reform hyphenation
2026-10-29 21:53:14 -04:00
Brandon Thomas 53eeb497c2 Merge pull request #1949 from garrytan/fix/settle-chained-own-story-wraps
compose: settle a story's own anchored wraps by object count, not 4 passes
2026-10-29 21:53:10 -04:00
Brandon Thomas 0a05c1631c Merge pull request #1233 from seanth/running-header-order
[fix] Running headers read a page in text order, not by height
2026-10-29 21:52:08 -04:00
Brandon ThomasandClaude Opus 5.5 cc47975960 Use clamp for the wrap pass bounds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:43:16 -04:00
Brandon ThomasandClaude Opus 5.5 a9256308e3 Keep at least four wrap passes for a story with few anchored objects
A single wrapping object moved by keep options or vertical justification had four passes to
settle before; one-per-object would have given it two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:39:35 -04:00
Youssef Azriouil 7a3e69e20a Hyphenation: bundle the Dutch patterns
Enable hypher's "dutch" feature: Piet Tutelaers's hyph-nl.tex 1.1 from
hyph-utf8, MIT licensed (added to NOTICE). Dutch text, including InDesign's
nl_NL_2005, now hyphenates instead of never breaking a word.
2026-10-29 13:38:15 +01:00
moppeeer e16e0c4d61 Merge remote-tracking branch 'origin/main' into paragraph-rule-types
# Conflicts:
#	crates/compose/src/lib.rs
#	crates/doc/src/attrs.rs
#	crates/idml/src/export.rs
#	crates/idml/src/import.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
2026-10-29 12:08:24 +01:00
moppeeer 165d8c65ac Merge remote-tracking branch 'origin/main' into paragraph-shading-indesign
# Conflicts:
#	ROADMAP.md
#	crates/doc/src/attrs.rs
#	crates/idml/src/export.rs
#	crates/idml/src/import.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/panels/properties.rs
2026-10-29 11:50:25 +01:00
moppeeer 4145fcbc44 Merge remote-tracking branch 'origin/main' into text-frame-options-layout
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
#	docs/target-app-parity.md
2026-10-29 11:41:36 +01:00
moppeeer 45751393ef Merge remote-tracking branch 'origin/main' into hyphenation-french-italian 2026-10-29 11:39:17 +01:00
KnottyDyesandClaude Opus 5.5 d7bc6633e7 Compose: honor discretionary hyphens in single-line composition
Recognize U+00AD independently of automatic hyphenation in the greedy breaker, reusing the existing visible hyphen output. Cover both composers, zero-width unbroken soft hyphens, pattern suppression, and tagged and untagged PDF text extraction.

Fixes #1955

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 00:14:44 -06:00
VoiceLessQ 89ccfbb18c Autoflow: count each forced move once, and only visible breaks (#1209)
fit() counted every break character in the overset text and every
Start Paragraph option. A break followed by a paragraph whose option it
already meets moved the text once but asked for two frames, and breaks
that tracked changes delete or a hidden condition hides asked for
frames that composing never uses. Autoflow added those pages and
removed them again: 200 chapters that end in page breaks and start on
the next page took 61095 ids and 430 ms, now 798 ids and 16 ms.

Each paragraph composing places now counts once, when a visible break
ends the paragraph before it or its start option sends it on; after a
break it is at the top of a frame, where the option only fixes odd or
even page parity. A visible break inside a paragraph counts once more.
previous_visible_break and the new visible_break in designcraft-compose
are public, so the estimate and the composer use one rule.
2026-10-28 23:08:41 -02:00
KnottyDyesandClaude Opus 5.5 ed88f3e4b5 Compose: tables clear the footnote area
Reserve column and spanning footnotes when fitting inline table row groups. Continue rows in the next column or frame when the remaining space is too small, and include cell-local footnotes in measured row height.

Fixes #1901

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:44:34 -06:00
VoiceLessQ ca85be89d2 Autoflow: skip deleted paragraphs and ask for every forced frame at once (#1209)
The start option lookup now reads the next paragraph composing places,
past tracked-deleted ones. Frames that start options and breaks force
are counted and asked for in one round, so a story with a paragraph per
page no longer gets one frame per round.
2026-10-28 22:32:07 -02:00
Claude 11f4364705 Merge storytold/main (v0.14.0) into xref-edited-text
The IDML import and export of edited cross-reference text move to import/story.rs and
export/story.rs with upstream's split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-28 18:09:43 +00:00
Claude 94e0e75249 Merge storytold/main (v0.14.0) into running-header-order
The running-header tests move to cmd/variables/tests.rs with upstream's split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-28 18:00:57 +00:00
hslrmnp27 0ecaa95206 T.DE1: merge upstream main while preserving German hyphenation 2026-10-28 14:52:15 +01:00
Dylan M. Taylor 71a579e8da Refactor compose for strict Clippy checks 2026-10-28 11:39:26 +00:00