Commit Graph
3352 Commits
Author SHA1 Message Date
Mikael Tollefsen 2e7852fa4d Pages drawn mid-zoom are unhinted, and hinted once the zoom stops
A Ctrl/Cmd+wheel notch eases in over several frames and a pinch changes
the scale every frame: each frame was a new size, so its pages were
hinted afresh (a new hinting instance per face and every glyph hinted
again, about 1.5 ms more per page) and the hint caches filled with sizes
nobody rests on, which could clear the one the zoom ends at.

While a pointer zoom changes the scale, pages are now drawn unhinted;
the hinting is part of the page's texture key, so the first frame at
rest draws the page hinted, also at the size the last zoom frame drew.
A zoom that leaves the scale as it is (at 10 % or 500 %, or over the
ribbon) keeps the pages hinted, and other scale changes (Zoom dialog,
slider, a fit zoom following the window) are drawn hinted at once.

Rounding sizes into buckets was considered instead: steps between
eased frames are far larger than any bucket fine enough to keep the
glyphs on the pixel grid at the size the zoom ends at.

Tests: an easing Ctrl+wheel zoom draws every in-between size unhinted
and the page hinted the frame it stops; the decision for a gesture,
the zoom limits and other scale changes; the page key holds the
hinting.
2026-10-20 01:01:15 +02:00
Mikael Tollefsen 3ee5840d6d Page text on Linux is hinted like FreeType's hintslight 2026-10-20 01:01:15 +02:00
Matteo AndreuzzaandClaude Sonnet 5 05a3df36f2 #3099: Resolve a trailing slash on the formula object's href
CodeRabbit review on PR #3115: an xlink:href like "./Object 1/" (some
ODF producers write the object folder with a trailing slash) doubled
the slash before content.xml, so the zip lookup missed and the fix
silently fell back to the undecodable replacement image again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 00:56:59 +02:00
Matteo Andreuzza 59d9beaeec 3099: Read embedded ODT equations from their MathML object 2026-10-20 00:56:59 +02:00
rabisandClaude Opus 5.5 d1e7acfdf5 #2986: the focus test also takes the keyboard away with Tab
After Tab moves the keyboard to the dialog's next control, each box takes
it back with one input-method reset, then none, and the next key reaches it
(review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 00:51:55 +02:00
rabis fb92192fd2 2986: Search and three other boxes stop resetting the input method every frame 2026-10-20 00:51:55 +02:00
sanches 6f9b7a1803 da: translate the Insert Spike, Spike and Multilevel List Library entries
The Dutch reviewer's merge brought three new tab/command labels the
Danish catalog had not covered yet.
2026-10-20 00:30:28 +03:00
ratkoandClaude Opus 5.5 06a120b19f Drop a picture near the bottom of a page where it lands (#3169)
To find the offset from its anchor paragraph, a dropped object was
first laid out at the paragraph's top. Near the bottom of a page that
pushed the paragraph onto the next page, so the object ended up about
a page below the drop point, cut off at the page edge.

Now it is first placed where it was dropped, and the paragraph's
position is read from that layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 23:28:45 +02:00
aiongg e4804235c5 Task panes: F6 past the last pane gives the document the keyboard (#1756) 2026-10-19 21:01:32 +00:00
NaxvogandClaude Opus 5.5 fec27d66d1 CLI: run without --file uses the region's paper, like convert (#3152)
A bare `run` built its document with Document::new() (Letter) and never went
through file.new, so it skipped the system region's paper. It now runs
file.new, as `run --template` already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:54:41 +02:00
aiongg 0802788da9 Task panes: follow craft-ui panes at 787b706 (#1756) 2026-10-19 20:46:51 +00:00
Frédéric WeilandClaude Opus 5.5 912b98c833 Watermark: the text fills its shape's box, as Word's textpath does
Word's text watermark is a VML WordArt shape (`PowerPlusWaterMarkObject`)
whose `v:textpath fitshape` stretches the text over the shape's box (its
`style` width and height), centred on the margins and, when diagonal,
turned by `rotation:315`. WordCraft ignored the box: it drew the text
70 % of the page diagonal wide (half of it on screen), centred on the
page and along the page diagonal (55° on A4, not 45°). A "BROUILLON"
watermark in a 515 x 104 pt box came out about 1.4 times as large as in
Word.

- doc: `Watermark::size`, the shape's box (`None`: Word's default, half
  the page diagonal across, as high as the text's length makes it);
  `Watermark::frame` gives the box for a page, shared by the writer and
  the renderers.
- docx: the box is read from the shape's style and written back; a box
  equal to the default for the document's page reads as `None`, so a
  watermark made by Design > Watermark keeps following the page.
- pdf, render: the text's advance spans the box's width, its em the
  box's height, the em's foot (the font's win descent below the
  baseline) on the box's bottom; the box centred on the margins,
  turned 45° counterclockwise when diagonal.

Checked against Word for Microsoft 365 (ink bounds, pt, left top right
bottom; fonts here: Liberation Sans for Arial and Calibri, Liberation
Serif for Times New Roman):

  BROUILLON, Calibri, 515.4 x 104.1, 315°:
    Word 93.6 222.7 489.1 619.2; before 60.5 110.4 535.7 732.5;
    after 90.7 214.1 495.8 618.7
  SPECIMEN, Arial, 400 x 100, 315°:
    Word 136.3 261.6 455.0 580.3; before 66.7 108.5 539.0 727.7;
    after 137.8 255.4 454.6 573.1
  HXH, Arial, 300 x 100, flat: Word 158.9 378.2 436.3 449.8;
    before 105.1 353.8 490.1 489.6; after 158.9 380.2 435.8 449.3
  HXH, Times New Roman, 300 x 100, flat: Word 149.8 383.0 445.0 449.3;
    after 151.2 383.5 443.5 449.3
  COPIE, Calibri, 300 x 80, flat: Word 153.1 387.8 441.1 440.2;
    before 96.0 373.9 500.2 469.0; after 152.2 387.4 443.5 444.5

Tests: a watermark with a box of its own is written and read back with
it, Word's default box reads back as none; in the PDF, the text of a
300 x 80 pt watermark is 80 pt high, stretched across, starting at the
box's left edge on the margins' centre line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:31:10 +02:00
jvspierandClaude Opus 5.5 ed7f458560 #2722: Dutch interface — the 73 entries added since, and wording fixes
Fills every entry the Polish reference catalog has that Dutch was missing
(main moved on since the PR was written). Wording fixes, chosen by a native
Dutch speaker while using the interface:
- Review tab: Controleren; the Proofing group/options page: Taalcontrole
  (its button already reads "Spelling en grammatica")
- AutoSave: Automatisch opslaan
- Quick Access Toolbar: Sneltoegangslijst everywhere (was three different names)
- Hide Ink (two-line label): Inkt verbergen (word order)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:28:18 +02:00
jvspier bf1135c0d7 Merge main into #2722 (no conflicts) 2026-10-19 22:28:18 +02:00
Frédéric Weil | FSSPXandClaude Opus 5.5 a683260abf Borders: dotted, dashed and dash-dot borders take Word's dash patterns
Paragraph, cell and table borders were dashed, but not with Word's
patterns: dots were one width on and two off (Word: one and one),
dashes four on and two off (Word: three and one), and dash-dot was
drawn as plain dashes.

- layout: borders use their own strokes (`Stroke::BorderDotted`,
  `BorderDashed`, `BorderDotDash`); `Stroke::dashes` gives every
  pattern in line widths. Underlines and the other dotted lines keep
  theirs.
- pdf, render: lines are stroked with `Stroke::dashes`.

Checked against Word for Microsoft 365 (ink along each border, on
synthetic documents): borders 0.5, 1 and 2.25 pt wide, dotted / dashed
/ dotDash, are 1-1, 3-1 and 3-1-1-1 widths in Word; before 1-2, 4-2 and
4-2; after as Word (2.25 pt dashes: 6.72 on / 2.28 off in both).

Test: in the PDF, a dotted 1 pt border is dashed 1 / 1, a dashed 2 pt
border 6 / 2, a dash-dot 1 pt border 3 / 1 / 1 / 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:08:46 +02:00
dfgodvan e537dce6af Docs: tabs that wrap with their text in the pagination gap (#1840) 2026-10-19 23:08:19 +03:00
dfgodvan 10dff145c5 Docs: the tab-wrapping entries name the cases they cover (#1840) 2026-10-19 23:08:14 +03:00
dfgodvan 076eb68cd0 Layout: a tab wraps away only from text, not from markers alone
A left tab past the right indent, or a right, centre or decimal tab whose text
doesn't fit, wrapped whenever any cluster was before it on the line, so a
bookmark before the tab was left on a line of its own. It now wraps only when
something that takes room is before it.
Test: a_bookmark_before_a_left_tab_past_the_right_indent_is_not_a_line.
2026-10-19 23:07:57 +03:00
dfgodvan a216519d44 Docs: tabs that wrap with their text in layout-parity and the progress log (#1840) 2026-10-19 23:07:57 +03:00
dfgodvan c1d829d5c5 Layout: a left tab still past the right indent on the line it wrapped to takes no room
A left tab whose stop is past the right indent wraps to start the next line.
When that line can't reach the stop either, the tab went past the line's end,
its text didn't fit after it, and the tab was left on a line of its own. As
before the wrap, it now takes no room there and its text starts at the indent.
Test: left_tab_past_the_right_indent_does_not_add_a_line.
2026-10-19 23:07:36 +03:00
dfgodvanandClaude Opus 5.5 a22c2757b4 Layout: a tab whose text doesn't fit goes to the next line with it
A TOC entry whose text just fits showed its page number at the left of a line of its own,
without the leader. Two cases ended the line after the tab and started the next one with its
text at the indent:
- the text after a right, centre or decimal tab didn't fit;
- the text ended past the last stop, and the next default stop was past the right indent
  (the tab was left at the end of the line with no width).

Like Word and LibreOffice, the line now breaks before such a tab: the tab starts the next line
and goes to the first stop there, so a TOC page number ends at its stop after a leader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 23:07:36 +03:00
Frédéric WeilandClaude Opus 5.5 94d938fa63 Text: scaled letters (w:w) are stretched, not spaced out
Character scale (`w:w`, Format > Font > Advanced > Scale) widens or
narrows the letters themselves. WordCraft multiplied the advances but
drew each glyph at its natural width, so text at 200 % looked letter-
spaced (pdftotext even split it into words) and text at 50 % overlapped.

- layout: `Draw::Glyphs` carries `x_scale` (1 = 100 %), the run's scale
  for its text and its line-end hyphen (whose advance is scaled too);
  list labels, tab leaders, ruby, equations and shape text keep 1.
- pdf: a scaled run is drawn under a horizontal scale from its first pen
  position, the positions brought back so each glyph lands where the
  layout put it; the text and its extraction are unchanged.
- render: each glyph's outline is stretched across from its pen
  position.

Checked against Word for Microsoft 365, "HIHIH" in Arial 20 pt
(Liberation Sans here), right end of the word (pdftotext) and ink:

  200 %  Word 179.78, ink 73.92..176.52; before: split in three words,
         ink to 163.68; after 179.74, ink 74.04..176.52
  150 %  Word 152.19; after 152.52
   50 %  Word 97.76; after 98.07
  100 %  unchanged

Test: in the PDF, letters at 200 % are drawn twice as wide and as high,
at pen positions twice as far apart; at 100 % unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:02:49 +02:00
Frédéric WeilandClaude Opus 5.5 858cc838bf Layout: anchored objects thinner than a point keep their size
A floating object's frame was clamped to at least 1 pt on each side.
Word keeps the size: a 0.25 pt high rectangle (a cut mark, a rule drawn
as a filled shape) is 0.25 pt high, and a `line` shape 0 pt high is a
horizontal line. WordCraft drew the rectangle 1 pt high from its top
edge (its middle 0.375 pt too low) and the flat line from its start
down to 1 pt below its end, a slanted stroke.

- layout: `float_rect` keeps sizes from 0 pt (not finite: 0); the
  PDF and raster shape outlines already draw a flat line and skip an
  empty rectangle.

Checked against Word for Microsoft 365 (page-anchored, no outline
unless said; ink top..bottom in pt, 2400 dpi):

  0.25 pt rectangle   Word 99.99..100.26  before 99.99..101.01  after 99.99..100.26
  0.5 pt rectangle    Word 120.00..120.51 before 120.00..120.99 after 120.00..120.51
  0.75 pt rectangle   Word 140.01..140.76 before 140.01..141.00 after 140.01..140.76
  1 and 2 pt          unchanged, as Word
  flat line, 0.25 pt  Word 219.87..220.14 before 219.87..221.13 after 219.87..220.11
  flat line, 1 pt     Word 239.49..240.51 before 239.49..241.50 after 239.49..240.51
  upright line, 0 wide, 0.25 pt: Word 299.88..300.12 across, before
  299.88..301.14, after 299.88..300.12

Test: rectangles of 0.25, 0.5, 1 and 2 pt, a flat line and an upright
line keep their sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:02:49 +02:00
Fin Warman b42f1b8061 Refresh main without changing feature history (#2431) 2026-10-19 20:52:37 +01:00
Магда М.Г. af2eb4c6ad Merge remote-tracking branch 'up/main' into up-symbol-font-line-height
# Conflicts:
#	crates/layout/src/tests.rs
#	docs/layout-parity.md
2026-10-19 22:48:35 +03:00
Магда М.Г. bb4c579a4d Merge remote-tracking branch 'up/main' into up-fonts-roman-known-substitutes
# Conflicts:
#	crates/fonts/src/word.rs
#	crates/layout/src/para.rs
#	docs/file-format-parity.md
2026-10-19 22:46:07 +03:00
Hamza d78238345c Rename: split the name at its last dot, not at a byte offset
The extension check counted bytes back from the end of the name and
sliced there, which panics when that offset falls inside a character:

    (file.rename {"name": "abecde"} with a combining accent, .docm)
    byte index 3 is not a char boundary; it is inside 'e' (bytes 2..4)

Splitting at the name's own last dot asks the same question without an
arithmetic offset, and reads the same for every name. Covered for a name
with no extension and one with the document's, both multi-byte.
2026-10-20 00:39:52 +05:00
Hamza 2b43d06b90 Rename: a name given with the document's extension keeps it, once
`file.rename` appended the document's extension unconditionally, so
`{"name": "renamed.docx"}` produced `renamed.docx.docx`. The Rename field in
the ribbon edits the stem, which is why it was written that way, but a script
or an agent passes a whole file name.

A name that already ends in the document's extension is now taken as the whole
file name, whatever its case. Anything else still gets the extension: a name
that merely holds a dot (`Report.2026` -> `Report.2026.docm`), and the
extension on its own (`.docm` -> `.docm.docm`), which is a stem rather than a
file name.

Fix: #2983
2026-10-20 00:39:52 +05:00
SlavenDj 943fe2c8ae Crop any part of a picture: a side can take 95% of the source, not 45% (#3135) 2026-10-19 21:05:17 +02:00
SlavenDj 7360d50e72 #2958: the Print page's button leads the settings, in the primary accent
File › Print put "Print" between the printer settings and the page
settings, styled like every other button there, so the page's one action
was hard to find and didn't read as an immediate action.

The button now comes first in the settings column, above the printer and
the settings it prints with, as Word has it, and wears the accent the app
gives a dialog's primary button (the file browser's Open and Save, OK and
Save in dialogs): the first thing seen, and plainly the action. It still
prints through `ui.print`, and it is still disabled while a native print
job is busy.
2026-10-19 20:09:16 +02:00
Tyrel Haveman 452244fd19 Merge remote-tracking branch 'upstream/main' into table-of-figures-label
# Conflicts:
#	ROADMAP.md
2026-10-19 10:40:16 -07:00
justinjohn0306 0a5d0af4f0 Fix #3137: Cannot insert a tab inside table cells (missing Ctrl+Tab shortcut) 2026-10-19 23:02:15 +05:30
e6c5a701dd The caret and clicks land between the letters of a ligature (#1974) (#2006)
* Fix #1974: the caret and clicks land between the letters of a ligature

The glyph's advance is shared evenly among its letters (mirrored in
right-to-left text); ligature letters keep their character spacing.

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

* Fix #1974: a long word never wraps inside a ligature

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

* Fix #1974: a hyphenation point never splits a ligature

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

* #1974: ligature tests use a bundled font that draws fi and ffi as ligatures

They assumed the installed default-font stand-in draws ligatures; Liberation Sans (Linux) draws
none, so they failed there.

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 Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-19 13:09:22 -04:00
4e2568e2da RTF import: heading and code formatting compared with the file's own stylesheet (gap 19 follow-up) (#2236)
* gap 19: RTF import compares heading and code run formatting with the file's stylesheet

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

* gap 19: review round 1: a style chain with formatting words is complete; unnumbered entries are Normal

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>
2026-10-19 12:57:16 -04:00
b8debb3050 Content controls: typed text takes the control's formatting, in any language (#3116)
* Content controls: typed text takes the control's formatting, in any language

Text typed in place of a content control's placeholder takes the
control's own run properties (w:sdtPr/w:rPr, ECMA-376 §17.5.2.27), as
in Word: in a protected form filled in Word for Mac, all 17 entered
values carry the style their control's rPr names. WordCraft kept that
rPr only as XML to write back and gave typed text the placeholder's
formatting minus the placeholder style.

It also knew the placeholder style only by its English id,
PlaceholderText. German Word writes Platzhaltertext (the name stays
"Placeholder Text"), so in forms from German Word every entry stayed
grey, on screen and in the saved file, and restoring a placeholder
added a second Placeholder Text style. The style is now found by its
built-in name.

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

* Content controls: typing drops a showing placeholder's own style

A control without run properties that shows its placeholder: text typed
over it drops the placeholder run's character style whatever its id
and name. Word localizes only the placeholder style's id, but another
program may localize its name too, and the name lookup then misses it.
Restoring a placeholder and new controls keep the name lookup.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-19 12:53:44 -04:00
f1b4be8a04 Restrict Editing: forms protection keeps a form's content controls (#3112)
* Restrict Editing: forms protection keeps a form's content controls

With Filling in forms enforced (w:edit="forms"), Word greys out the
Developer tab's control buttons and Properties, and a field's shortcut
menu offers no Remove Content Control: only the fields' content can be
filled in. WordCraft refused these only outside the fillable fields, so
with the caret in one it removed the control (its content left as
plain, no longer fillable text), inserted new controls inside it, and
renamed it; only lock changes were refused.

Under forms protection, inserting any content control, Properties
(every setting) and Remove Content Control are now refused before they
run. Typing, Toggle Check Box, Choose List Item and Set Date still fill
the fields. Other protection modes are unchanged.

Observed in Word for Mac 16.113 on a protected real-world form
(72 content controls: rich text, check boxes, date pickers); the same
form filled in WordCraft opens in Word still protected, with its values,
ticks and dates.

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

* Restrict Editing: parity row states what forms protection refuses

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

* Restrict Editing: correct the comment on content-control property edits in forms mode

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-19 12:49:05 -04:00
2304bf6ac6 Fix Paragraph::sentence_at at the first character of a sentence (#3105)
* Fix Paragraph::sentence_at at the first character of a sentence

Found while testing crates/doc/src/para.rs:1397-1427

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

* sentence_at: a terminator followed directly by text doesn't end the sentence at the caret

"Hello.World" at offset 6 gave an empty (6,6) range; only treat the caret as just past a
sentence end when the character at the caret is a space.

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

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-19 12:45:25 -04:00
MyAIPluginsandClaude Opus 5.5 322b3d765c test(pdf): a described shape is exactly one Figure
The test checked that the description is there, so a Figure written twice
would still pass. It now also counts the alt text entries.

Suggested by the CodeRabbit review of this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:36:37 +02:00
MyAIPluginsandClaude Opus 5.5 d16dd5cd72 fix(pdf): tag each picture in a rotated group on its own
A rotated inline group is drawn inside one rotation. Its tag was chosen for
the whole group: an artifact as soon as one member was decorative, so a
picture next to it lost its Figure and alt text; otherwise one Figure with
the first picture's alt text. The group is still turned as a whole, and each
picture in it is now tagged on its own: decorative ones as artifacts, the
others as Figures with their own alt text.

Found by the CodeRabbit review of this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:36:37 +02:00
NetterSilverandClaude Haiku 5.5 e8866ea58b Keep an ordered list's start number in Markdown import (#3103)
Found while testing crates/formats/src/markdown.rs:160-161,463 and crates/formats/src/model.rs:111 (ListInfo)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-19 12:32:33 -04:00
NetterSilverandClaude Haiku 5.5 74ab8d2819 Keep a single leading space in HTML export paragraphs (#3102)
Found while testing crates/formats/src/html.rs (export, around line 1744; paragraph text writer)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-19 12:32:27 -04:00
NetterSilverandClaude Haiku 5.5 517ba09250 Write large whole numbers without decimals in format_number (#3107)
Found while testing crates/doc/src/locale_number.rs:114

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-19 12:32:21 -04:00
Diego GueriniandClaude Sonnet 5.5 49a934fba7 #3067: script parse test compares paths with Path::join (#3106)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 12:29:17 -04:00
Fin Warman 7d80ba4caa M711: merge main and bind font geometry fixtures 2026-10-19 17:28:17 +01:00
MyAIPluginsandClaude Opus 5.5 73d159b6c9 fix(pdf): shapes with a description are figures in tagged PDF
A shape with a description (Alt Text) was exported as an artifact like any
other shape, so screen readers skipped it and the description was lost: an
arrow or an icon drawn with shapes that means something was invisible to them.

A shape that has a description, is not marked decorative and shows no text is
now a Figure with its description, inline (rotated too) and floating. Shapes
without a description and decorative shapes stay artifacts. A text box keeps
its frame as an artifact and its text read as paragraphs: its description would
replace the text, so it isn't used. The rule lives in `shape_figure_alt`.

Draw::Figure's `kind` becomes an Option (None for a shape), and Placed::Shape
carries the description for floating shapes.

Not covered: a group's own description (its members are placed one by one),
and shapes inside a Drawing Canvas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:52:55 +00:00
MyAIPluginsandClaude Opus 5.5 8664afe58f fix(export): pictures marked decorative are skipped by screen readers
A picture marked decorative (Alt Text > Mark as decorative, `adec:decorative`
in DOCX) was still exported as content:

- tagged PDF: a Figure with its alt text, or with "picture" when it had none,
  inline and floating alike. PDF/UA expects decorative content to be an
  artifact, so screen readers skip it. Draw::Image now carries the mark, and
  the exporter tags a decorative picture (inline, rotated or floating) as an
  artifact instead of a Figure.
- HTML and Markdown (and ODT, which reads the same model): the description,
  which the document keeps when a picture is marked decorative, was written
  as its alt text. A decorative picture now exports with an empty alt text
  (alt="" in HTML), the WCAG way to say "skip this".

Pictures not marked decorative are unchanged. Charts and diagrams are left as
figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:52:55 +00:00
ratkoandClaude Opus 5.5 bbdd11f8ff #3120: test the Caption dialog through its OK button
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:50:08 +02:00
fluorineandClaude Sonnet 5.5 9540d5ee4d Dark theme: the File page's side bar uses a deeper blue
The side bar used the light theme's bright blue in both themes. It now
reads a token, `nav`: the same blue in light mode and a muted indigo in
dark mode. White text on it stays above 4.5:1 (tested).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 10:43:19 -04:00
Tyrel HavemanandClaude Opus 5.5 5a5305a7b4 references: a hand-typed caption's label is dropped in any case for \a (#3013)
A hand-typed caption is matched to its label in any case, but `\a` (no
label and number) stripped the label case-sensitively, so "figure 4: Lower"
was listed whole. Found by a local CodeRabbit review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Nnsfu3QGqjD1aFZbBgUWP
2026-10-19 07:24:17 -07:00
ratkoandClaude Opus 5.5 4c0dbb429f Insert Caption picks the label used last, as Word does (#3120)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:17:23 +02:00