View ▸ Show/Hide ▸ Rulers (Ctrl+R / ⌘R) reserves a strip along the top
and left of the document area and draws rulers in the measurement units
preference, from the top-left of the page under the pointer (or the
current page) in its displayed orientation. Major ticks use the 1/2/5
interval that keeps labels apart at the current zoom, the tick count is
capped, and a marker follows the pointer. The choice persists, and the
control channel takes `rulers=on|off` and reports `rulers`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c8a854134f)
F11 did nothing in PdfCraft. The only full screen was Full screen mode
(Ctrl+L), which hides everything but the page to present it.
`view.full_screen_with_menu_bar` (View > Full screen mode with menu
bar, F11) switches the shell's screen mode between Standard and Full
Screen With Menu Bar, which the shell already offers: the window fills
the screen and keeps its menu bar and panels. macOS keeps its own
shortcut, so F11 stays unbound there. In Full screen mode, F11 leaves
that mode. Leaving Full screen mode now gives back the mode it was
entered from, so a window already full screen with F11 stays so.
Fixes#7954
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 5aab4b98fc)
Added text could only use the standard Helvetica, Times and Courier
faces, so characters outside WinAnsi (Greek, Cyrillic, CJK) were
refused. An added text item can now name a page font resource
(`AddedText::font_resource`): it is drawn with that embedded font
(Type 0, Identity-H, wrapped with the font's own advances), kept in
`/PCAdded` across saves, and painted in the item's ink like other text.
The Format text panel offers the page's document fonts, Load font… and
the installed fonts for added text as well as for edited paragraphs; a
pick or a loaded font applies to the draft, the selected added text
(undoable) or the style for the next text. Bold and italic are off for
an explicit font resource.
Rebased onto the craft framework UI port (#8160).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main split the engine's lib.rs into modules; the as-opened validation is ported: Editor::as_opened and AsOpened in history.rs, editor_signatures in doc_state.rs (used wherever an editor's signatures are validated), the as-read capture in open.rs, and mark_saved clearing it in session/save.rs. The test also pins the saved status (dynamic Invalid, static Valid).
With marks, a page the marks would widen past 14,400 pt was refused only after the
document's Will Print actions ran, so their field change stayed behind a print that
failed. Session::check_printer_marks runs the mark editor on a scratch copy first;
doc_print calls it before Will Print, and the print still adds the marks after it.
Main split organize/src/import.rs into import/{carry,combine,copy,fields}.rs and already made set_attachments UTF-16-safe and indirect-/Names-safe (this PR's other two hunks), so those take main's version. Ported the PR's core change: insert_file_pages now merges the source's catalog attachments via carry::collect_attachments + attachments::entries (made pub(crate)) + set_attachments. PR's engine regression test file kept as-is; parity evidence/notes merged onto main's entries (it/ paths); ROADMAP/docs entries added to main's text. cargo check -p pdfcraft-organize -p pdfcraft-engine --tests passes locally.
A producer may draw a sentence as one text run with a gap and paint the
bold word into it. The prose box then spans the word instead of ending
beside it, so the overlap limit rejected it and the word was suggested
as a heading. Prose whose box spans the line on its row now counts as
beside it; the row, size, style and lower-case conditions are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The beside test required the same size, so a 9 pt bold keyword in 10 pt
prose (RFC 9110 page 16, reported on #6020) was suggested again. A line
now counts as inside a sentence when the prose beside it is no smaller
than it; a heading set larger than run-in text beside it stays a heading.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocks set inside a sentence were removed before the heading rules ran.
The check is symmetric, so prose beside an italic word was removed too,
and a page of such paragraphs lost its body text: the body size became the
heading's, and the heading was dropped. Inline blocks now stay in the
evidence, counting toward the body style, but marked as having no letters,
which the rules never take as a heading.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bold run inside a paragraph is a text line of its own, so the layout
fallback saw a short bold block where the body is regular and proposed it
as a bookmark. A line now counts as set inside a sentence when prose sits
beside it on the same row: boxes sharing at least half the shorter one's
height, side by side, at most half an em apart, at the same size, in
another style, with a lower-case letter. Such blocks are left out like
captions. The lower-case test keeps a bold title after its section number,
the half-height overlap keeps a heading over tightly set text, and the
half-em gap keeps a heading across a narrow gutter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(rename): separate filename and full-path boundary fixtures
* Preserve repository LF endings in rename test fixtures
* Preserve UTF-8 text in rename fixture repair
---------
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
buttonGetIcon is implemented now, so the script the test used no longer
throws. The test calls a method PdfCraft lacks, as the neighboring
document-script test does, and changes the document script before each edit
because the script realm runs an unchanged document script once.
A branch past the depth or visit limit set `cut`, which then refused
every later node, so a shallow heading after a deep branch was lost.
The limits now only skip the node and report it; only the heading cap
still ends the walk. Marked content past the limit is reported too.
When no tagged heading is found and the suggestion falls back to
layout, the structure walk's truncation is kept in `truncated`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bookmark_suggest's structure path always said truncated: false, though
pdfcraft_a11y::headings stops silently at 10000 headings, at a tree nested
past 256 levels and after a million visits. headings_with_truncation
returns the same list and whether one of those limits stopped the walk
where a heading could have been; headings keeps its signature and output.
The heading cap is now checked when a heading is met, so exactly 10000
headings is not reported as cut.
The tool description told callers to edit levels; a suggested bookmark has
no level and bookmark_import refuses one. It now says to move bookmarks
into or out of children.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>