Commit Graph
59 Commits
Author SHA1 Message Date
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 Thomas 08b6e335dd Merge pull request #102 from skylartaylor/fix/idml-cell-edge-priority
IDML: honor explicit cell edges at table borders
2026-10-07 22:03:36 -04:00
skylar taylor-barrick 0629137ef7 IDML: import scalar InsetSpacing property values 2026-10-07 16:10:32 -06:00
skylar taylor-barrick 0f888ef794 IDML: honor explicit cell edges at table borders 2026-10-07 14:38:40 -06:00
aiongg 5f52150b31 CJK 1.9: document fonts belong to their document
The fonts in a document's Document Fonts folder are registered under a
font scope that the document holds while it is open (Document::font_scope,
runtime only; DocState keeps the scope alive and closes it when the last
copy of the state goes: file.close, closing a tab, revert, a book
chapter's export, the session ending). Composition, preflight, font.list,
Package and the font menus, Glyphs panel and previews look fonts up
through FontDb::scoped(scope): the document's own faces first, then the
shared ones. Other open documents don't see them, and two documents with
fonts of the same name each set text in their own. Composite fonts'
member fonts and the fallback for kenten marks are looked up the same
way.

Font files stay in memory for the session (FaceRef keeps faces for the
process); a document opened again reuses the faces of its unchanged files
(same path, length and modification time) instead of reading them again.
The composition cache's signature includes the scope; the word cache and
the outline and PDF font caches are keyed by face. Variable font
instances are kept per base face.

A family's installed faces join the shared fonts all at once, and a
face two lookups load at the same time is kept once, so a parallel
fallback lookup never takes a family's bold before its regular has
loaded.
2026-10-07 10:44:46 -04:00
aiongg 6df33fa344 CJK 1.7: story direction belongs to the story
Vertical is a story property: every frame of a thread is vertical or
horizontal together, a frame threaded onto a story takes its direction,
and frames split off by threading or breaking a thread keep theirs.
Type > Story Direction is type.storyDirection {vertical} (checked in the
menu) for the stories of the text selection or selected frames;
object.textFrameOptions {vertical} and frame.create {vertical} set the
frames' stories. Documents that stored Vertical on the frame open with
each story taking its first frame's direction. IDML StoryOrientation is
read into and written from the story, beside its column direction
(StoryDirection), which stays a separate setting.
2026-10-07 10:44:46 -04:00
Shao Wenbin c861a9f75e TYPE1: Reapply Chinese and Arabic typesetting rules on main
Port the CJK1 and AR1 changes from 3ecdb78 and de83cdc onto current main. Resolve translation and font-stack conflicts by retaining main localization and craft-fonts integration while preserving all typesetting code, tests, and documentation.

Validation: all six CI gates passed, including 616 tests and WASM checks.
2026-10-07 18:16:32 +08:00
Brandon ThomasandClaude Opus 5.5 d84107aaca Never crash: importers (text, IDML, fonts, format, EPUB, images)
An .xlsx cell reference far from the others no longer allocates the whole
range before the cell cap (billions of cells, out of memory), and long
column names can't overflow. IDML import doesn't trust zip part sizes for
up-front allocation and adds header/footer counts saturating. Tagged Text
and IDML export use let-else; the font fallback has a compiled-in last
resort. These crates deny the panicking lints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:43:34 -04:00
Brandon ThomasandClaude Opus 5.5 8490965e71 CI: fix new Rust 1.99 clippy lints (as_chunks, ?, redundant ref)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:37:09 -04:00
Brandon ThomasandClaude Opus 5.5 5294c8f677 T: ruby and kenten
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:47:55 -04:00
Brandon ThomasandClaude Opus 5.5 5b7969901c T: right-to-left carets and selections; Binding: Right to Left
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:34:47 -04:00
Brandon ThomasandClaude Opus 5.5 ee55acd858 T: Digits (World-Ready) — figures in Arabic-Indic, Persian and native scripts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:06:38 -04:00
Brandon ThomasandClaude Opus 5.5 fe40d4b80b T: tate-chu-yoko in vertical frames
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:46:52 -04:00
Brandon ThomasandClaude Opus 5.5 b13135472a V: Rotate Spread per spread — canvas layout through per-spread transforms
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:25:16 -04:00
Brandon ThomasandClaude Opus 5.5 77fc006b02 T: vertical type — Vertical Type tool, upright CJK, CJK line breaking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:18:14 -04:00
Brandon ThomasandClaude Opus 5.5 368767ee5d I: page transitions in interactive PDF (+ panel)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 05:46:45 -04:00
Brandon ThomasandClaude Opus 5.5 6b2fa19f00 T: right-to-left text — bidi shaping and line reordering, paragraph direction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 05:29:56 -04:00
Brandon ThomasandClaude Opus 5.5 6a476a28e3 L: Liquid Layout — page rules, liquid guides, object pins, alternate layouts (+ panel)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 04:56:27 -04:00
Brandon ThomasandClaude Opus 5.5 10b599ab2c H: linked stories — Place and Link, out-of-date, update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:37:01 -04:00
Brandon ThomasandClaude Opus 5.5 d6d9c385ea X: XML basics — tags, style-to-tag map, structure, export/import, tagged frame markers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:21:30 -04:00
Brandon ThomasandClaude Opus 5.5 fcec2902be X: Articles panel — reading order for EPUB/HTML
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:56:24 -04:00
Brandon ThomasandClaude Opus 5.5 ba95a6f900 F: stroke styles — stripes, wavy, hash drawn (screen + PDF); named custom styles (+ IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:39:39 -04:00
Brandon ThomasandClaude Opus 5.5 2fefab232c T: custom anchored object positions (+ IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:55:34 -04:00
Brandon ThomasandClaude Opus 5.5 79c73c815d T: paragraph borders and shading offsets, per column part (+ panel, IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:23:49 -04:00
Brandon ThomasandClaude Opus 5.5 2f54f0b53d O: Frame Fitting Options — auto-fit on resize, align from, crop (+ dialog, IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:14:47 -04:00
Brandon ThomasandClaude Opus 5.5 4f18835eb3 T: hyphenation exceptions in the user dictionary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:06:37 -04:00
Brandon ThomasandClaude Opus 5.5 ee89bf187f T: nested line styles (+ dialog, IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:01:48 -04:00
Brandon ThomasandClaude Opus 5.5 eb2e8d8b4f C: Appearance of Black — output rich black, Overprint [Black] at 100%
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:51:51 -04:00
Brandon ThomasandClaude Opus 5.5 efb563673f C: Ink Manager — spots to process, ink aliases (PDF, IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:47:58 -04:00
Brandon ThomasandClaude Opus 5.5 c2fbf1b0f6 C: Transparency Blend Space setting (+ IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:28:43 -04:00
Brandon ThomasandClaude Opus 5.5 3b462285c5 T: editorial notes — anchored, flagged on screen, never printed; Notes panel
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:18:21 -04:00
Brandon ThomasandClaude Opus 5.5 d11b23d805 T: endnotes — numbered references, generated endnote frame, options
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:10:36 -04:00
Brandon ThomasandClaude Opus 5.5 af0d241190 T: conditional text — conditions, hide/show in layout and exports, panel, IDML
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:02:15 -04:00
Brandon ThomasandClaude Opus 5.5 902fd214c2 C: Swatches panel colour groups (+ IDML ColorGroup)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:45:59 -04:00
Brandon ThomasandClaude Opus 5.5 53ec1e046c T: Preferences › Advanced Type (super/subscript size and position)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:28:38 -04:00
Brandon ThomasandClaude Opus 5.5 3609862c2e C: Attributes panel — overprint fill/stroke/gap, nonprinting
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:18:30 -04:00
Brandon ThomasandClaude Opus 5.5 74e352698e F: Global Light and Generate Static Caption
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:42:46 -04:00
Brandon ThomasandClaude Opus 5.5 175aaf28fd H: place a chosen PDF page (Image Import Options)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:57:38 -04:00
Brandon ThomasandClaude Opus 5.5 1b778945af T: named lists continuing across stories (list.define, listName/startAt); null clears overrides
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:52:11 -04:00
Brandon ThomasandClaude Opus 5.5 6b362c5f71 I: IDML — nested and GREP styles, cell and table styles, type on a path (TextPath)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:43:35 -04:00
Brandon ThomasandClaude Opus 5.5 4aa76b85f9 T: Underline / Strikethrough Options — weight, offset, colour, tint
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:57:02 -04:00
Brandon ThomasandClaude Opus 5.5 5c547f9a96 T: OpenType menu — feature toggles, figure styles, stylistic sets (type.openType, IDML OTF attributes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:29:36 -04:00
Brandon ThomasandClaude Opus 5.5 66ab252044 F: Gradient Swatch tool, Gradient panel, unnamed gradients (object.gradient)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:15:01 -04:00
Brandon ThomasandClaude Opus 5.5 f8ccff2470 F: Color panel, Color Picker, unnamed colours
- color: Swatch.hidden — unnamed colours (applied, not listed in Swatches until added)
- engine: object.color (reuses a swatch with the same colour, else an unnamed one; fill or
  stroke), swatch.addToSwatches (optionally named; users follow the rename),
  swatch.addUnnamed (+ test)
- UI: Color panel with fill/stroke proxy, CMYK/RGB/Lab, channel sliders with gradient tracks and
  value fields, tint slider for named swatches, spectrum ramp, Add to Swatches; Color Picker
  dialog (double-click a proxy chip); Swatches hides unnamed colours

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:45:39 -04:00
Brandon ThomasandClaude Opus 5.5 87727f279a D: Paste Into, Polygon Settings
- Edit › Paste Into (⌥⌘V): copied objects (with their stories and images) become the selected
  frame's content, clipped by it; Item::is_group / has_nested_items; renderer and PDF draw fill,
  clipped content, stroke; IDML nests the items inside the frame both ways (verified in
  InDesign 2026) (+ tests)
- Polygon Settings: sides and star inset as engine preferences used by the polygon tools and
  frame.create; double-click the Polygon tool (+ test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:24:48 -04:00
Brandon ThomasandClaude Opus 5.5 252ae0df32 M6: anchored objects in IDML (inline / above line), verified in InDesign 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:25:20 -04:00
Brandon ThomasandClaude Opus 5.5 5a9fa2d16a M5: anchored objects — inline and above line
- doc: OBJECT_MARK with Story::objects (items normalized to the origin) kept in sync on edits,
  copy/paste slices and threading
- compose: inline objects are wide glyphs sitting on the baseline (Y offset; auto leading grows);
  above-line objects push their line down; placements per frame follow vertical justification
- render + PDF draw anchored items with their lines
- engine: anchored.insert/options/release/list; pasting copied items into text anchors them;
  Options/Release act on the object at the insertion point (+ test)
- Object › Anchored Object menu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:21:24 -04:00
Brandon ThomasandClaude Opus 5.5 c2222959de M7: index — page references, Generate/Update Index, IDML topics
- doc: INDEX_MARK with Story::index_refs kept in sync (topics 1–4 levels, sort keys, current
  page / to end of story / next n paragraphs / suppressed / See / See also); index builder with
  section headings, nested or run-in entries, merged page ranges; Document::index for updates
- engine: index.addReference (topic from the selection), index.list, index.generate, index.update
  with Index Title / Section Head / Level 1–4 styles (+ tests)
- IDML: PageReference markers and the Index topic tree with See / See also cross-references,
  both ways (verified in InDesign 2026)
- Layout › Index menu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 22:45:55 -04:00
Brandon ThomasandClaude Opus 5.5 01b3603751 M7: cross-references and text anchors; menus expose engine features
- doc: ANCHOR_MARK / XREF_MARK with Story::anchors / xrefs kept in sync on edits, 11 formats
  (InDesign's building blocks + partial paragraph), paragraph anchors, typographic quotes
- compose: anchor pages via an XrefIndex (cached per document signature); cross-references are
  resolved at composition, so they never go stale; '??' for missing destinations
- PDF: cross-references become link annotations to the destination page
- IDML: export/import as HyperlinkTextDestination / CrossReferenceSource / Hyperlink /
  CrossReferenceFormat (+ XRef page variables); verified live in InDesign 2026
- engine: xref.insert/list/setFormat/defineFormat/formats, anchor.create/list (+ tests)
- UI: New Cross-Reference dialog (styles → paragraphs, format); menu pass adding TOC, sections,
  text variables, hyperlinks, footnotes, step and repeat, spelling, fitting/content submenus,
  effects, Data Merge, Preflight, EPUB; fixed-parameter menu variants; ui.menu.invoke opens
  generated dialogs; every-menu-entry-is-a-command test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 22:26:47 -04:00