Files
wordcraft/docs/parity.md
T
Saeed AzarehgarandClaude Opus 5.5 5d86dec250 Right-to-left and Persian text support (bidi, shaping, RTL paragraphs, DOCX) (#207)
* feat(doc,docx): complex-script run properties and RTL OOXML round-trip

Model the formatting Word applies to Persian, Arabic and Hebrew text:
cs, font_cs, size_cs, bold_cs, italic_cs and lang_bidi on CharProps,
resolved with Word's fallbacks (ResolvedChar::complex). Size, bold and
italic pair with their complex-script values so a run's size or bold
also covers its Persian characters. Add doc::bidi script helpers, and
keep ZWNJ and Arabic marks inside words for word selection.

DOCX: read and write w:rFonts/@w:cs, w:szCs, w:bCs, w:iCs, w:cs and
w:lang/@w:bidi in schema order; stop using the cs font as the Latin font.
Tests round-trip Persian text with ZWNJ, digits and mixed Latin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(fonts): directional shaping and Persian font fallback

Add shape_run to shape a run in a known bidi direction (Arabic joining,
mirrored brackets). Prefer Persian-capable fonts (Vazirmatn, Noto Naskh/
Sans Arabic…) for right-to-left fallback, pick bold/italic fallback faces,
and map common Persian document fonts (B Nazanin, B Lotus, B Titr,
IRANSans…) to open substitutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(layout): Unicode Bidirectional Algorithm and right-to-left paragraphs

Run UAX #9 per paragraph (unicode-bidi), shape each level run in its
direction, keep marks and ZWNJ with their letter and a word in one
fallback face. After line breaking, apply rules L1/L2 per line and give
each cluster a visual box; right-to-left paragraphs are laid out from
their start edge and mirrored, so indents, tabs, alignment, list labels,
drop caps, floats and borders sit on the right.

Caret, hit testing and selection use visual geometry (split selections,
caret at bidi boundaries, DocLayout::visual_step for arrow keys). Display
items carry glyph-to-text ranges, which the PDF writer now uses. Plain
left-to-right lines are unchanged. No hyphenation of RTL words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(engine,ui): paragraph direction commands and RTL editing

Add para.ltr / para.rtl (Word's text direction buttons) that change only
the reading order, and make the alignment buttons visual in right-to-left
paragraphs (para.align also takes start/end). Arrow keys move visually in
bidirectional text, Ctrl+arrows follow reading order, and Bold/Italic/
Size/Font cover complex-script text. Ribbon buttons with code-drawn
icons, a mirrored ruler for RTL paragraphs, translations, catalog,
parity and roadmap updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(contributors): add Saeed Azarehgar to people.toml

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): para.align with an explicit value sets it, without toggling

Only the alignment buttons toggle back to the start edge when pressed
again. para.align (used by the Paragraph dialog, scripts and agents) now
sets the requested alignment, as seen on the page, in each selected
paragraph's own direction. Previously pressing OK in the dialog with
Center or Right selected reset the paragraph to the start edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(ui): Direction option in the Paragraph dialog

Add Word's Direction (Right-to-left / Left-to-right) to the Paragraph
dialog's General section. The dialog now shows alignment and Left/Right
indents as seen on the page, mapping them to the paragraph's logical
start/end values on OK, so an unchanged OK no longer flips a
right-to-left paragraph. OK logic moved to apply_paragraph, with tests;
ja/zh translations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(layout): allow hanging trailing spaces in the RTL display test

A wrapped right-to-left line's trailing spaces hang past its end edge
(the left margin), as left-to-right lines hang them past the right. The
test failed whenever the loaded fallback fonts made a line end there;
it now checks only visible glyphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:26:41 -04:00

3.1 KiB
Raw Blame History

WordCraft feature parity

Generated by cargo xtask parity (wordcraft-cli parity --markdown): the word-processor feature catalog (crates/engine/src/catalog.rs) compared with the live command registry.

378 of 428 catalog features have commands (88.3%).

Tab Live Total
File 20 20
Quick Access 4 4
Home 92 101
Insert 42 53
Draw 0 11
Design 10 10
Layout 18 19
References 24 24
Mailings 17 17
Review 26 29
View 25 29
Table Design 5 5
Table Layout 28 30
Equation 21 22
Picture Format 13 13
Shape Format 2 6
Header & Footer 5 5
Editing 23 24
Tools 3 6

Missing

Home

  • Clipboard › Paste Special (edit.pasteSpecial)
  • Clipboard › Clipboard Pane (edit.clipboardPane)
  • Font › Phonetic Guide (format.phonetic)
  • Font › Enclose Characters (format.enclose)
  • Paragraph › Asian Typography (para.asianTypography)
  • Styles › Style Inspector (styles.inspector)
  • Styles › Manage Styles (styles.manage)
  • Editing › Advanced Find (edit.advancedFind)
  • Voice › Dictate (tools.dictate)

Insert

  • Tables › Draw Table (table.draw)
  • Illustrations › Online Pictures (insert.onlinePicture)
  • Illustrations › Icons (insert.icon)
  • Illustrations › 3D Models (insert.model3d)
  • Illustrations › SmartArt (insert.smartArt)
  • Illustrations › Chart (insert.chart)
  • Illustrations › Screenshot (insert.screenshot)
  • Illustrations › Drawing Canvas (insert.canvas)
  • Add-ins › Get Add-ins (addins.get)
  • Media › Online Video (insert.video)
  • Symbols › Ink Equation (insert.inkEquation)

Draw

  • Tools › Select (draw.select)
  • Tools › Lasso Select (draw.lasso)
  • Tools › Eraser (draw.eraser)
  • Pens › Pen (draw.pen)
  • Pens › Pencil (draw.pencil)
  • Pens › Highlighter (draw.highlighter)
  • Pens › Add Pen (draw.addPen)
  • Convert › Ink to Shape (draw.inkToShape)
  • Convert › Ink to Math (draw.inkToMath)
  • Insert › Drawing Canvas (insert.canvas)
  • Replay › Ink Replay (draw.replay)

Layout

  • Arrange › Group (arrange.group)

Review

  • Language › Translate (review.translate)
  • Protect › Block Authors (review.blockAuthors)
  • Ink › Hide Ink (review.hideInk)

View

  • Window › Arrange All (view.arrangeAll)
  • Window › View Side by Side (view.sideBySide)
  • Window › Synchronous Scrolling (view.syncScroll)
  • Window › Switch Windows (view.switchWindows)

Table Layout

  • Draw › Draw Table (table.draw)
  • Draw › Eraser (table.eraser)

Equation

  • Tools › Ink Equation (insert.inkEquation)

Shape Format

  • Shape Styles › Shape Effects (shape.effects)
  • Text › Text Direction (shape.textDirection)
  • Text › Align Text (shape.alignText)
  • Text › Create Link (shape.link)

Editing

  • Selection › Column Selection (select.column)

Tools

  • Customize › Customize Ribbon (tools.customizeRibbon)
  • Customize › Customize Keyboard (tools.customizeKeyboard)
  • Templates › Templates and Add-ins (tools.templates)