Each underline style in the drop-down is now a sample of its own line,
drawn in code in the theme's text colour (Single, Double, Thick, Dotted,
Dashed, Dot-dash, the missing Dot-dot-dash, Wave), named for tooltips and
assistive technology. Words only uses format.wordUnderline (its own
Ctrl+Shift+W); None removes the underline and shows no shortcut; More
Underlines… opens the Font dialog; Underline Color › offers Automatic and
the theme/standard colours with More Colors….
- engine: format.underlineColor {"color": "RRGGBB" | "auto"} sets or
clears CharProps::underline_color and leaves the style alone;
format.state reports underlineColor; catalog row Home|Font|Underline
Color (parity checklist regenerated: 490/505).
- i18n: Dot-dot-dash, More Underlines… and Underline Color in all 22
catalogs (Underline Color reuses each catalog's "Underline color").
- Tests: underline_color_sets_and_clears_the_underlines_own_colour (engine,
DOCX round trip, undo, junk params), underline_menu_entries_apply_their_style
(UI: every sample is a named entry that applies its style; Words only,
None, Underline Color › Automatic).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failure caused by the snapshot itself (size limit, folder or disk budget,
a value the format cannot keep) now keeps the recorded revision, so tick
does not rewrite up to 256 MiB every interval while nothing changes.
Transient failures (locks, I/O) still retry at the next interval.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Word sizes a line by the fonts in it, and a bullet in Symbol (Word's
default, U+F0B7) has a taller ascent than Calibri or Times New Roman.
Without Symbol (Linux, macOS without Office, the web build) WordCraft
draws the bullet from another face and used that face's height, so every
bulleted line was shorter than Word's: 14.5 pt against 15.1 pt in
Calibri 11 pt at 1.08 spacing, 14.9 against 15.7 in Times New Roman 12 pt.
symbol_font_metrics gives Symbol's and Wingdings' ascent and descent as
Word's PDFs state them, and a run in one of them that isn't installed
takes them. The label's ascent now comes from its style, so the existing
rule (the label's extra ascent added unscaled) sees them.
Measured in Word 2016: Calibri 11 / Times 12 bullets 15.08 / 15.72 pt,
WordCraft now 15.07 / 15.75 pt. On 251 real documents against Word PDFs,
page breaks at the same word 45.4% -> 50.1%.
#1613 draws a missing font in Cambria when the font table classes it as
roman, as Word does. Times New Roman is roman in every font table, so
where it isn't installed (Linux, the web build) every Times document came
out in Caladea: lines 2.1 pt taller at 12 pt and different line breaks.
Word always has Times New Roman, so it never applies that rule to it.
The rule now leaves alone a font whose substitutes are chosen by its name
(a metric-compatible clone or the same design under another name: Times,
Arial, Courier New, Palatino, the symbol, Hebrew and Persian fonts).
Fonts with no clone of their own (Cambria, Georgia, brand fonts) still
follow it.
Checked on 251 real documents against PDFs from Word: exact page counts
201 -> 229, page breaks in the same place 45.4% -> 51.9%.
Right-clicking the page offered only Cut, Copy and Paste, even with
formatted text on the clipboard. Word's context menu lets you choose how
to paste there.
The context menu now has the same items as Home › Paste's menu, in the
same order and with the same shortcuts: Paste (the clipboard's
formatting kept, Word's Keep Source Formatting), Keep Text Only, Merge
Formatting and Paste Special…. They run the same commands (edit.paste,
edit.pasteText, edit.pasteMerge, edit.pasteSpecial), and
system_clipboard::fill already reads the system clipboard's text, HTML
and RTF for all of them. Every label was already translated in the 22
interface catalogs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dragging an In Line with Text picture, shape or text box now moves it within
the text, as in Word: a dashed insertion cursor follows the pointer through
the text, and the drop puts the object there, still inline and selected, in
one undo step (Ctrl+drag drops a copy there). Before, the drop floated it with
Square wrapping where it was let go, and nothing showed where it would land.
arrange.bounds and arrange.copyTo take {"to": Pos} for inline objects; x/y
keep their old meaning for scripts. Floating objects drag as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Word for the web writes each table of contents entry as a HYPERLINK
complex field around the heading's text, a tab and a PAGEREF field.
The DOCX reader buffered the whole field into one field object with a
flat text result, so the tab was drawn as a box instead of reaching the
dotted right tab stop, the page number was no longer a field of its own,
and the link could not be followed. Rewriting those fields as
w:hyperlink elements makes WordCraft draw the TOC as Word does.
A HYPERLINK field, complex or simple, now reads the way a w:hyperlink
does: its result stays ordinary content carrying the link (url,
url#bookmark or #bookmark from \l), with nested fields kept. It is
written back as w:hyperlink; the tooltip (\o) and target frame (\t) are
dropped. A HYPERLINK field with no target stays a field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening note.txt, typing, saving with Ctrl+S and closing still asked
"Do you want to save changes to note.txt?". Save in that prompt wrote
the file but left the window open, and only Don't Save closed it.
file.save marked the document saved only for formats that keep
everything (.docx, .odt, .rtf...). A save in any other format counted
as a copy, even over the file the document was opened from, so a .txt
or .md document could never become clean. The Save Changes prompt then
treated its own Save as "not saved" and cancelled the close.
A save over the document's own file now marks it saved in any format.
Save As to plain text, Markdown or a page image elsewhere is still a
copy that leaves the document unsaved, as before. AutoSave still
covers only the formats that keep everything.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apple Pages writes a sizeless w:framePr (xAlign left, y 0, hRule
exact) into w:pPrDefault. WordCraft read it as the default paragraph
frame, so every paragraph inherited it. The header's title of
traditional_skills_job_form was drawn from the page's left edge over
the first table, the footer's page number left the bottom of the page,
and table rows came out shorter than in Word.
Word ignores that frame: its PDF of the same file shows the title at
the left margin and "1/4" in the footer. Taking just that element out
of styles.xml gives WordCraft the same page. The reader now drops the
frame from the paragraph defaults and keeps the rest of them. Frames
from styles and direct formatting are unchanged, and the default frame
isn't written back on save.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Wayland, AltGr (Right Alt on Polish, German, Czech… layouts) arrives as
the Right Alt key followed by a modifiers event without Alt, since it turns
on Level 3 Shift (Mod5), not Alt. The KeyTips state machine read that event
as Alt let go with nothing pressed in between and opened KeyTips while AltGr
was still held, so the next letter went to the badges instead of typing ś,
ł, ż.
A modifiers event without Alt no longer ends the press while an Alt key is
still down by key events (its key-up does), and a release opens KeyTips only
if the Alt modifier was on during the press (Left Alt always counts), so a
bare AltGr tap doesn't open them either. Right Alt that is Alt (US layout)
still does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some fonts (the static Noto Naskh Arabic builds) draw لا as a lam and a
zero-advance alef with their own clusters at one x. visual_order kept the
tie in logical order, so the right-to-left run's ranges didn't decrease,
krilla dropped /ReversedChars and السلام extracted as السالم. Ties between
clusters now go in reverse text order when right to left (text order
otherwise).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Notes and comments now work with RTF tracked changes (#1516) and per-section
headers and footers (#1495); a \sect inside a note or comment no longer ends
a section. Adds a test for the combination.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rebased on main. sl.tsv now has 2,614 entries, every key of every other
catalog, including the native print settings (Tiskalnik, Odtenki sive,
Obojestransko tiskanje), mail merge filter and sort, Go To, bookmarks,
privacy options, interface size and dictionary folder strings. Three keys
main renamed were replaced.
- Slovenian added alongside Vietnamese, Swedish and Croatian in the
language list, the audit list and the Polish coverage exclusions.
- New test: sl has no keys outside the other catalogs.
- localization-parity.md, localization-sl.md and ROADMAP.md counts,
language lists and status lines updated.
A 2,463-entry Slovenian catalog: every key of every other catalog in the
repository (built-in style names, equation gallery, paper sizes, citation
styles included). Written from the meaning of the English labels in ordinary
Slovenian computing vocabulary; no other product's localisation was used.
Counts use count-neutral wording ("Besede: 21"), since the catalog has no
dual/plural forms.
- sl, sl-SI, sl_SI.UTF-8 select it automatically; "Slovenščina" in Options
and ui.language with {"value":"sl"}.
- The interface audit checks Slovenian coverage the way it checks Russian.
- Tests: locales and saved preference, catalog coverage and key terms,
count wording, and bundled fonts covering č, š, ž.
- docs/localization-sl.md with conventions and terminology; parity table,
README, ROADMAP and ATTRIBUTION updated.
Native JSON wrote Document::media and Document::passthrough with serde's
default for bytes, an array of numbers. With a synthetic 27 MiB picture a
recovery copy (compact) was 96.4 MiB and a .json file (pretty-printed,
one number per line) 285.5 MiB.
Each part is now one standard base64 string (doc::byte_store, using the
workspace base64 crate), encoded straight into the writer. Reading accepts
base64 or the old array of numbers, so recovery copies and .json files
written before still open; anything else is an error, never a panic.
Measured (release, same synthetic picture): compact 96.4 -> 36.0 MiB,
pretty 285.5 -> 36.1 MiB, write 252/614 -> 52/57 ms, read 404/533 ->
46/37 ms. A recovery snapshot of a 6,000-paragraph document with the
picture: 99 -> 39 MB, worker time 2.3 -> 0.26 s, start-up scan 1.03 ->
0.14 s.
Tests: byte_store unit tests (round trip, old arrays, hostile values);
recovery_format.rs native_json_stores_bytes_as_base64,
native_json_with_byte_arrays_still_opens, native_json_with_bad_bytes_is_an_error,
ignored measurement native_json_size_with_a_large_picture; desktop.rs
copies_with_byte_arrays_written_before_still_restore.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On macOS, Cmd+Left/Right were bound to Word Left/Right (same as Option+arrows).
Bind them to Line Start/End there, as in Word for Mac and every Mac text field;
Option+arrows still move by word. Windows/Linux keys are unchanged.
Co-authored-by: justinjohn0306 <babyjjbabyjj549@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
* fix(ui): draw Arabic and other non-Latin comment text in balloons
Comment balloons and the Comments pane draw comment text and author
names with the interface faces (Inter, Source Sans, CJK), which have no
Arabic, Hebrew, Thai and so on: every such letter was a box. The app now
borrows a document fallback face that covers the comments, as the window
caption does (#840), checked once per document revision.
egui also lays bidi runs and words out left to right, so a right-to-left
comment read backwards. Read-only balloons now wrap the text by word
widths, put each row in display order (Unicode bidi runs, words of a
right-to-left run reversed, brackets mirrored) and set right-to-left
paragraphs against the right edge. Text without right-to-left letters is
laid out exactly as before. The editable fields (the selected balloon and
the Comments pane) keep logical order.
Also adds my contributor entry (sync_github_name).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* One contributor entry each
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Mohamed Youssef <ms.rightsteps@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
part that inherits its lines sends it, and the picker only shows No Border checked for it.
- CellProps::valign is Option<VAlign>: a cell's own Top (Align Top, w:vAlign="top") beats a
table style part's vertical alignment, and round-trips through .docx.
- tableStyle edit rejects Part fields at the top level without "part".
- "font": null or "" makes a part's font inherited; clearing the dialog's font box sends it.
- Document ui.dialog's optional "part" in docs/control-protocol.md.
Co-authored-by: Dmitrii Khlapov <19991457+dkhlapov@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* #714: table style editor formats every table style part
Modify/New Table Style: "Apply formatting to" any of the 13 ECMA-376
§17.7.6 parts (whole table, header/total row, first/last column,
odd/even row and column bands, four corner cells), each with font,
size, bold, italic, underline, colour, fill, borders (line style,
width, colour; all/none/outside/inside/each edge) and the 9-way cell
alignment, over a live preview.
- doc: TablePart, PartFormat, PartSet; TableStyleParts::part/set_part
(new parts and per-part jc/vAlign in `regions`)
- layout: generic part resolution incl. band2, corner cells, alignment
- docx: every tblStylePr type read/written with pPr jc and tcPr vAlign
- engine: table.newStyle/modifyStyle take ECMA part names, `part`,
`parts`, per-edge `borders`, `underline`, `align`/`vAlign`/`cellAlign`
- ui: dialog moved to dialogs_table_style.rs; ui.dialog takes `part`
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* i18n: Hungarian and French strings for this change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Review fixes for #887: Bulgarian strings for the table style parts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #714: Vietnamese strings for the table style parts (main's new vi catalog)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* hr: match the catalog's word for banded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Dmitrii Khlapov <19991457+dkhlapov@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
* Tables: preserve row table border exceptions
* Tests: shorten the row border regression name
---------
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Same pattern as Portuguese (#797) and Polish (#346): the cs_CZ
dictionary is read from the system at runtime (e.g. Debian/Ubuntu
hunspell-cs), nothing is bundled. Suggestions use the dictionary's own
MAP/REP/TRY/KEY; grammar stays generic (repeated word, spacing), with
digit ratios like "3 : 1" exempt. The Czech interface now writes new
documents (and opened .txt/.md) in cs-CZ.
Engine fixes the Czech dictionary needs, also used by pl/pt:
- PFX/SFX header lines may carry a trailing comment (cs_CZ has
"SFX y Y 80 #…"); rule lines are left literal;
- NOSUGGEST stems are accepted when typed but never offered;
- KEY is parsed for neighbour-key suggestions.
Tests use a hand-written synthetic Czech dictionary only; an
end-to-end engine test mirrors the Portuguese one.
Co-authored-by: Losminek <301412321+Losminek@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
* Ruler tab stops: corner selector, click to set, drag to move, drag off to clear
The ruler's markers were read-only (double-click opened the Tabs dialog,
click sets (Left, Center, Right, Decimal, Bar; right-click cycles back),
clicking the ruler sets one on the half-division grid (Alt places
freely), dragging moves it with a dashed guide down the page and a
position tooltip, and dragging it off the ruler clears it. Markers draw
per kind, mirrored for right-to-left paragraphs. Each gesture runs
para.tabs once on release, so it is one undo step and inherited-stop
clearing keeps working. Double-click still opens the dialog.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Progress docs: ruler tab stops (ui-parity Rulers row and revision history, ROADMAP progress log)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Tabs dialog: OK applies what the fields show; double-click a stop to edit its position
Selecting a stop, changing its alignment or leader and pressing OK now
applies the change without Set, and a new position typed while a stop
is selected (the dialog preselects the first) is set on OK, so adding a
stop never requires leaving the dialog for the ruler. Double-clicking a
stop in the list edits its position in place: Enter or clicking away
commits (the interface unit by default, any unit spelled out, either
decimal separator), Escape cancels, and the commit moves the stop in
one clear + set, keeping its alignment and leader. Clear still wins
over a re-typed cleared position, and junk input changes nothing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Tabs dialog: New button, delete from the list, and the list fills its frame
New stages a fresh stop - deselects, proposes the next free multiple of
the default interval after the last stop (skipping cleared positions),
resets alignment and leader, and focuses the position field - and Set
or OK adds it. Every row gets a small x that clears its stop, and the
Delete key clears the selected one when nothing is being typed; the
selection and an in-progress inline edit follow when a row above them
goes. The list is a fixed 150 pt wide and the rows and scrollbar fill
it, so labels stay left-aligned, the x sits at the frame's edge clear
of the scrollbar, and the scrollbar docks at the edge instead of
floating mid-list.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Tabs dialog: the stop list is an inline-edit table
Each row edits its stop in place: a unit-aware position field (rows
resort into position order once the edit ends, never mid-typing; two
stops landing on one position merge, the edited row winning), an
alignment dropdown and a leader dropdown (the closed box shows just the
fill), and the x that clears the row. The double-click editor and
move_stop go: the table subsumes them. The selected row keeps an accent
outline, its edits sync the fields below, and the frame widens to fit
the three columns.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Tabs dialog: the table is the whole editor
New adds a row straight into the table at the next free multiple of
the default interval, selected and ready to edit in place, and the
position field, the Alignment and Leader radio groups and the Set and
Clear buttons go: every one of their jobs is a table cell or the row's
x. What stays is New, Clear All, the default interval, the cleared
list and OK/Cancel, with OK applying the staged diff as one para.tabs
call. The staged-field methods (set, clear, on_ok) go with them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Review fixes: safe ruler gestures, one tab tolerance, dialog cleanups
Ruler gestures are primary-button only, a click on an indent marker
places nothing (the markers absorb their clicks), Escape cancels a drag
like a table-border drag (#217), and a drag is stamped with its
paragraph: the caret leaving it mid-drag, or a release the ruler never
saw, abandons the gesture instead of applying it elsewhere or late. The
dragged marker no longer double-draws on its first frame. One
TAB_POS_EPS in the doc layer replaces four hardcoded 0.5s across the
engine, the dialog and the ruler. The dialog's normalize is a no-op
unless a position edit happened, its combos share the ruler's KINDS and
one LEADERS table, dead code and a stale doc comment go, and the
ui-parity revision row moves to the table's top. Regression tests cover
each gesture rule.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>