Commit Graph
362 Commits
Author SHA1 Message Date
aiongg 7d0bdbc916 Column rules: tint, horizontal offset and top/bottom insets; IDML import and export
Text Frame Options gains Tint %, Top Inset, Bottom Inset and Horizontal
Offset for the rule, and object.textFrameOptions and document.inspect
take and report them. IDML reads the ColumnRule attributes of
TextFramePreference on frames and object styles and writes them when a
rule is set.
2026-10-10 00:33:27 +00:00
aiongg 1efbf0f894 Text frames: column rules draw between columns on screen and in PDF
A frame with Column Rule on gets a bar centred in each gutter, inside the
insets, broken around paragraphs that span columns; right-to-left and
vertical frames included. object.textFrameOptions takes columnRuleWeight
and columnRuleColor (unknown swatches are an error) and an inset array
whose null sides stay; document.inspect reports the rule.
2026-10-10 00:26:13 +00:00
aiongg e1cc16325a Merge #263: Paragraph Rules: a dialog for the selected paragraphs and a section in Paragraph Style Options
Conflict: ROADMAP.md: kept next's IDML1 line and #263's Paragraph Rules line
Conflict: crates/compose/src/lib.rs: Rule Above uses #263's first line and Column/Text width with #83's rule_color() for colour and tint
Conflict: crates/engine/src/cmd/text.rs: type.para params doc lists next's drop cap fields and #263's ruleAbove/ruleBelow; format_paras is #263's
Conflict: crates/ui-egui/src/dialogs.rs: kept both confirm arms (characterStyleOptions, paragraphRules) and both sets of tests
2026-10-09 23:59:08 +00:00
aiongg fa13bf24f4 Paragraph rules: a partial ruleAbove/ruleBelow edit keeps the other rule fields; Rule Above honours Text width 2026-10-09 23:42:11 +00:00
aiongg 76746924fd Integration: rustfmt the composite note label call in shape_para
The #126 merge resolution moved #126's composite-font note label shaping into #81's
piece pass and passed #81's StyleRuns; the resulting call is longer than one line.
2026-10-09 22:54:32 +00:00
aiongg ee24cb949b Merge #129: Fix IDML Mojikumi spacing, kinsoku composition, and nested text preflight
#129's first commit (4f8d230) holds #124 and #126, which are already merged. Each conflicted file is a three-way merge of #129's own commits (4f8d230..pr/129) onto this branch, which takes #129's side against #126 and keeps the chain's (#81/#84) code.
Conflict: ROADMAP.md: kept both entries
Conflict: crates/compose/src/shape.rs: #129's Mojikumi metrics added; #81's pieces, the #126 composite-note piece and the #124 inline-object metrics unchanged
Conflict: crates/compose/src/tests.rs: tests only; #129's tests added, no duplicates of #124/#126's
Conflict: crates/engine/src/cmd/fonts.rs: #129's pub(super) for_each_story; #126's tests kept once
Conflict: crates/engine/src/cmd/preflight.rs: #129's nested-story paragraph rules; the used_fonts loop kept once
Conflict: crates/engine/src/tests.rs: tests only; #129's test added
Conflict: crates/fonts/src/fontdb.rs: #126 content (same in #129); no change
Conflict: crates/idml/src/import.rs: #129's Mojikumi import added
Conflict: crates/idml/src/tests.rs: tests only; #129's tests added
Conflict: crates/ui-egui/src/dialogs.rs: #126 content (same in #129); no change
Conflict: crates/ui-egui/src/lib.rs: #126 content (same in #129); no change
2026-10-09 22:52:22 +00:00
aiongg 988e45b0bb Merge #126: Fix composite font resolution, missing-glyph diagnostics, and document-wide font replacement
Conflict: crates/compose/src/shape.rs: #81 collects paint-only pieces and shapes them later, #126 shapes composite-font note labels inline. A footnote reference in a composite font becomes a Piece with `composite_note`, shaped alone in the piece pass with #126's per-entry label code (from the run's env, as in #126); other references stay ordinary pieces. #126's label fallback in shape_segment passes #81's StyleRuns.
Conflict: crates/fonts/src/fontdb.rs: #126's canonical_family lookup sits at the top of exact_style_traits, so #81's styles/traits_of/linked_style and #247's format-suffix fallback all use it; face() resolves canonical, then canonical without the format suffix, then #126's substitute_family, through #247's find_or_load; has_family is canonical_family as named or without the suffix
Conflict: crates/ui-egui/src/lib.rs: kept #84's system-clipboard copy match and added #126's Find Font on open and _fonts reset after it
Conflict: crates/ui-egui/src/dialogs.rs: OK label match has #146's Save and #126's Replace All; #80's alert-only OK kept, #126's Done label for findFont; find_font keeps #143's font_combo with #126's FALLBACK_FAMILY default
Conflict: crates/compose/src/tests.rs, crates/idml/src/tests.rs: tests only; kept both
Conflict: ROADMAP.md: kept both entries
2026-10-09 22:49:44 +00:00
aiongg 01799b4927 Merge #124: IDML: preserve anchored text frames and footnote artwork
Conflict: crates/compose/src/shape.rs: inline object on the baseline: #124's rule (its box alone sets the extents, not max with the font's) applied to every metric #83 tracks (ascent, typo_ascent, cap, xh); the above-line arm keeps #83's four fields
Conflict: crates/compose/src/tests.rs: tests only; kept both
Conflict: crates/engine/src/tests.rs: tests only; kept both
Conflict: crates/idml/src/tests.rs: tests only; kept both
2026-10-09 22:46:08 +00:00
aiongg d268d998a9 Merge #230: Preserve text decoration color resets, geometry and paint order
Conflict: crates/idml/src/import.rs: kept #230's Underline/StrikeThru colour line (Text Color resets) and #83's tint() helper
Conflict: ROADMAP.md: kept the chain's Text engine line and added #230's FID2 line
2026-10-09 22:43:44 +00:00
aiongg 277c442814 Merge #96: Compose: an empty paragraph takes its mark's character format 2026-10-09 22:43:00 +00:00
aiongg fa8492232e Merge #106: Compose: fit horizontal text frames by the last baseline 2026-10-09 22:41:32 +00:00
aiongg caa01d063e Merge #81: Text: kerning survives a colour change (#29) 2026-10-09 22:41:29 +00:00
aiongg 71074a987b Merge #84: Text editing, snapping and text threading (#23)
Conflict: crates/ui-egui/src/control.rs: tests only; kept #118's automation_contract_tests module and #84's tests module
Conflict: crates/ui-egui/src/lib.rs: kept #119's ImportedFile Inbox type and #84's ClipboardFn
Conflict: crates/ui-egui/src/menus.rs: tests only; kept #239's two Quick Apply tests and #84's copy/paste test
2026-10-09 22:41:29 +00:00
aiongg 4b24103b24 Merge #83: Layout: first baselines, Jump Object wrap, drop caps, IDML defaults 2026-10-09 22:40:47 +00:00
Skylar Taylor-Barrick a45375c335 FID2: preserve decoration color resets, geometry and paint order 2026-10-09 17:39:08 +00:00
Shao Wenbin 9f655739fa CJK-REVERT2: withdraw speculative spacing rules and narrow import rejection
Restore the previous preset and character-class coverage. Remove regional punctuation and Tsume policy changes while retaining cluster, tracking, and spacing-allocation repairs. Preserve finite unsupported rows for diagnostics instead of rejecting whole documents.
2026-10-08 20:36:21 +08:00
Shao Wenbin 1e32767cef CJK-MOJI8: preserve narrow punctuation and manual body compression 2026-10-08 20:18:30 +08:00
Shao Wenbin d9f24b6ad5 CJK-MOJI6: respect glyph clusters and regional punctuation metrics 2026-10-08 20:09:29 +08:00
Shao Wenbin a35f03c126 CJK-MOJI5: balance spacing priorities and fit discrete compression endpoints 2026-10-08 20:05:19 +08:00
Shao Wenbin c66d502c79 CJK-MOJI2: apply Mojikumi spacing and kinsoku priorities during composition 2026-10-08 19:54:22 +08:00
Shao Wenbin 4f8d230d70 CJK-BASE: integrate font resolution and special-text preflight branches 2026-10-08 19:50:38 +08:00
Shao Wenbin 06ed81e547 FONT4: resolve composite fonts and fallback for generated note labels 2026-10-08 18:54:26 +08:00
Shao Wenbin 2dbbf98900 FONT1: preserve composite font references and unify usage checks
Resolve imported composite fonts by resource identity and preserve literal
display names. Export AppliedFont as an object reference instead of registering
a composite definition as an ordinary font family.

Share composite lookup and typed font usage between composition, font inventory,
and preflight. Include nested cells and notes, and report only component fonts
selected by the document's characters.

Add synthetic coverage for reference round trips, footnote character mapping
and metrics, nested font inventory, component replacement, and undo.
2026-10-08 18:21:10 +08:00
Shao Wenbin 7c10b3ad41 IDML1: preserve anchored text frames and footnote artwork
Resolve forward story references before importing embedded frames and groups.
Compose embedded stories, retain anonymous-story objects for screen and PDF
rendering, and invalidate layout caches when embedded frame geometry changes.

Measure inline objects by geometry, fill open contours, reject cyclic frame
references, and distinguish unplaced stories from located overset text.

Add synthetic round-trip, composition, preflight, pixel-rendering, and PDF
regressions. Update the roadmap with the supported import and rendering paths.
2026-10-08 18:08:44 +08:00
Haseom Shin 36000e75f5 Compose: don't panic when a hyphenated paragraph starts with a no-break letter 2026-10-08 14:58:08 +09:00
Brandon ThomasandClaude Opus 5.5 38ec9ce7e0 Merge #106 (includes #83, #84, #81) into fix/empty-paragraph-mark
An empty paragraph's mark format now also supplies #83's first-baseline
heights through line_metrics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:30:23 -04:00
Brandon ThomasandClaude Opus 5.5 01eef9ed21 Merge origin/main into fix/empty-paragraph-mark
The empty paragraph's mark metrics feed line_metrics alongside main's CJK
line reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:28:22 -04:00
Brandon ThomasandClaude Opus 5.5 bed9438612 Merge #81 (includes #83, #84) into fix/compose-baseline-frame-fit
#83's Keep Lines Together tests change expectation: with the last baseline
allowed on the bottom inset, the first frame holds one more line, so the
10-line paragraph splits 7/3 instead of 6/4 (the keep rule is unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:24:30 -04:00
Brandon ThomasandClaude Opus 5.5 0237d5de93 Merge origin/main into fix/compose-baseline-frame-fit
Vertical Type is now the story's direction: the full-descent check reads
FrameSpec::vertical, and the vertical-extent test sets the story vertical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:20:01 -04:00
aiongg dc18c10448 Merge #84 into fix/29-kerning-across-runs 2026-10-07 23:14:02 -04:00
aiongg 0ae0dc7707 Merge the fork's fix/29-kerning-across-runs
# Conflicts:
#	crates/compose/src/shape.rs
#	crates/compose/src/tests.rs
2026-10-07 23:14:02 -04:00
Brandon ThomasandClaude Opus 5.5 4eb4e72d94 Merge #84 (text editing, includes #83) into fix/29-kerning-across-runs
Hidden place-holders, now shaped from pieces, also zero #83's typographic
ascent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:09:21 -04:00
aiongg 124bddaf8b Text: a change of kenten character keeps the kerning across it
Pieces of a paragraph that differ only in how they are painted are
shaped together; the kenten character only picks the emphasis mark drawn
over the text, so it is one of those paint attributes, like kenten
itself.
2026-10-07 23:08:45 -04:00
aiongg 3a10a749db Text: a missing font's substitute takes fallback fonts across a colour change
Text is shaped in pieces that differ only in paint, so each piece group,
and each piece shaped apart, takes its style's environment: a missing
font's substitute draws the characters it lacks from fallback fonts
whatever Draw Missing Glyphs from Fallback Fonts says.
2026-10-07 23:08:13 -04:00
aiongg c8d4ed8fa3 Merge main into fix/29-kerning-across-runs
# Conflicts:
#	crates/compose/src/shape.rs
#	crates/compose/src/tests.rs
2026-10-07 23:07:47 -04:00
aiongg f2f14120f3 Merge #83 into feat/text-editing-and-frames 2026-10-07 23:01:07 -04:00
aiongg 6fe91b0dfb Text: a drop cap in a document font aligns its left edge
A drop cap set in one of the document's own fonts measures its side
bearing in that font, through the document's font scope, so Align Left
Edge puts its ink at the indent.
2026-10-07 22:57:03 -04:00
aiongg 8ce8ed5fbe Text: list labels don't raise the Ascent first baseline
The bullet or number a paragraph's list adds no longer counts toward the
first line's tallest typographic ascender: with First Baseline Offset
set to Ascent, only the line's own text places the first baseline. The
label still counts toward the line's ascent, descent and leading, and
toward the Cap Height and x Height offsets. An empty list paragraph
places its first baseline as an empty paragraph does.

Characters that don't draw, such as spaces, keep counting toward the
Ascent offset; a test pins that.
2026-10-07 22:56:10 -04:00
aiongg bb608dc03f Text: a frame's visible stroke insets its text
A text frame's text area starts at the inner edge of its stroke: the
frame edge, then the part of the stroke inside the frame, then the
inset, on all four edges. A centred stroke takes half its weight, an
inside stroke all of it and an outside stroke none. A stroke without a
colour (or with no weight) doesn't count.

Composition, hit testing and vertical frames all take the text area
from the frame, so they agree. Graphics frames, wraps and the frame's
bounds are unchanged, and type on a path, which has no inset, ignores
the stroke as well.
2026-10-07 22:55:43 -04:00
aiongg 93287b0b10 Text: vertical scale doesn't move the Ascent first baseline
With First Baseline Offset set to Ascent, the first baseline sits the
font's typographic ascender times the nominal point size below the top
of the text area: vertically scaled characters no longer push it down.
The line's ascent and descent, its leading, the Cap Height and x Height
offsets and drop caps still follow the vertical scale.
2026-10-07 22:55:24 -04:00
Brandon ThomasandClaude Opus 5.5 6f42f598bc Merge origin/main into fix/29-kerning-across-runs
Pieces carry their style's shaping settings (a missing font's glyph
fallback) and group only with pieces that share them; jidori pieces stay
apart, since jidori fits its own run. shape_run / shape_run_raw take the
per-byte style runs; the digit substitution takes main's multi-byte
ranges and fallback lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:54:25 -04:00
Brandon ThomasandClaude Opus 5.5 0590f63406 Merge #83 (layout parity) into feat/text-editing-and-frames
Trailing spaces and drop caps both join the placed line; hit testing checks
the drop cap first, then the closest line (hit_line). hit_char also picks
the drop cap's character under the point, so a double click on the cap
selects from it (the follow-up both PRs named).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:47:17 -04:00
Brandon ThomasandClaude Opus 5.5 962234fbdf Merge origin/main into feat/text-editing-and-frames
Resolve conflicts with the CJK/Arabic work: trailing spaces follow the line
only in left-to-right paragraphs without right-to-left glyphs (layout_line
now takes the bidi info); style linking moves to ScopedFonts so the
document's own fonts count (FontDb delegates to scope 0); threading keeps
the receiving story's direction and Vertical Type, and frames split off by
threading or removed from a thread keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:41:43 -04:00
Brandon ThomasandClaude Opus 5.5 6e8e252cc4 Merge origin/main into feat/layout-parity
Resolve conflicts with the CJK/Arabic composition work: line metrics keep
the first-baseline tops and add the CJK alignment shift; the CJK line
reference adjustment applies before baseline-grid snapping; layout_line
takes the bidi info and the drop cap is spliced in after it; vertical text
is now the story's direction (FrameSpec::vertical); IDML insets use main's
validated inset_spacing over the object style chain; format's JSON upgrade
(vertical frames) and model upgrade (format v2 defaults) both run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:34:18 -04:00
Brandon Thomas aee756d604 Merge remote-tracking branch 'origin/main' into feat/cjk-and-fonts
# Conflicts:
#	crates/ui-egui/Cargo.toml
2026-10-07 22:04:42 -04:00
Brandon Thomas dd8d3037b1 Merge pull request #75 from ShaoWenbinSaleh/arabic-chinese-typesetting-rules-fix
Preserve and compose Chinese and Arabic typesetting rules
2026-10-07 22:04:16 -04:00
Brandon ThomasandClaude Opus 5.5 593848bf17 Compose: an empty paragraph's format comes from its own mark
Story::char_format_at returns the preceding run at a boundary (the format
typing takes), so a run ending at the empty paragraph's start gave it the
previous paragraph's mark format. Add Story::char_format_of (the run
containing the byte) and use it; regression test with differing marks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:56:43 -04:00
skylar taylor-barrick 8d56e875eb Compose: fit horizontal text frames by the last baseline 2026-10-07 16:10:43 -06:00
skylar taylor-barrick 0f888ef794 IDML: honor explicit cell edges at table borders 2026-10-07 14:38:40 -06:00
Deniz Kökden 60712dedb2 Compose: an empty paragraph takes its mark's character format
The line height of a paragraph without glyphs came from the paragraph style; InDesign uses the
format of the paragraph mark (the CharacterStyleRange holding its <Br/>).
2026-10-07 21:23:57 +02:00