Commit Graph
22 Commits
Author SHA1 Message Date
Fabian 887e868a46 fix: DeckCraft upstream #845
PDF export rasterized every slide as one full-page bitmap, so the
background, master and layout graphics a deck repeats were stored once
per slide. Draw each slide as its backdrop plus the slide's own shapes;
equal backdrops become equal images and the writer stores each once.
2026-10-17 15:52:54 +02:00
skylar taylor-barrick 0cbe475f13 fix(pdf): reconcile writer with notes and handout masters (PDFW)
Preserve notes and handout master export, visible text and native parallel
compression while propagating shared font errors through each export path.
Keep the dependency check accurate for native and WASM feature resolution.

PR #708.
2026-10-14 19:44:21 -06:00
Brandon ThomasandClaude Opus 5.5 67e1ab6373 Merge PR #438 from albayazid: Model: an exhausted id space refuses growth instead of duplicating ids (#407)
Conflicts resolved onto main's newer shape, and the PR's policy applied to
every alloc_id/add_media/new_slide call site main has grown since: commands
answer bad(cmd, NO_ID_SPACE) (slide.reuse, insert.zoom, SmartArt, photo
album, review.accept, handout/notes masters, master placeholders,
background/artistic/compress pictures, transition sound, ink to shape,
paste special, file.new templates); reid/bring_media/renumber/regenerate
and compare::adopt/accept are fallible; outline import keeps what fit.
Tests use expect() on the now-Option results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:24:26 -04:00
Brandon ThomasandClaude Opus 5.5 8ee597216d Fix up landed PRs from review
- #178: ToUnicode ranges looked up without indexing
- #465: frame_num gaps are concealed (bounded) even when the SPS forbids them; cut streams keep playing
- #471: control request lines up to 256 MB so picture/media inserts still fit
- #473: a merge that loses its only row or column is removed, with regression tests
- #521: AutoCorrect no longer rewrites real words (cant, wont, im)
- #654: inherit_placeholder_geometry's doc comment back on its function

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:31:01 -04:00
Brandon Thomas 31390e5e21 Merge PR #178 from MarekSpodBiedry: PDF: map each glyph to its shaping cluster's text in ToUnicode (#164)
# Conflicts:
#	crates/pdf/src/tests.rs
2026-10-14 14:24:15 -04:00
Brandon Thomas 76bfc19dfa Merge PR #592 from NikitkaRa: Notes Page view draws master text wrapped (stacked on #583) 2026-10-14 13:30:54 -04:00
Brandon Thomas 4cd6412a3c Merge PR #583 from NikitkaRa: PDF master header/footer text wraps and keeps mixed formatting (stacked on #580)
# Conflicts:
#	crates/render/src/lib.rs
#	crates/render/src/placed.rs
2026-10-14 13:30:43 -04:00
Brandon Thomas 6f634a9809 Merge PR #580 from NikitkaRa: Notes Master slide preview; master header/footer text keeps its formatting (stacked on #577) 2026-10-14 13:30:28 -04:00
Brandon Thomas 2d8014c706 Merge PR #577 from NikitkaRa: Notes pages and PDF handouts follow their masters (stacked on #573)
# Conflicts:
#	crates/pdf/src/lib.rs
#	crates/pdf/src/tests.rs
2026-10-14 13:30:22 -04:00
Brandon Thomas 99e9774408 Merge PR #566 from NikitkaRa: Make PDF export ~2.8× faster with byte-identical output 2026-10-14 13:08:54 -04:00
skylar taylor-barrick 42fb6728fa PDFW2: use fixed-size chunks in PDF text regression 2026-10-14 00:11:33 -06:00
Nikita Rakitin ec725a4e6b Notes Page view: draw master text wrapped, as the PDF does
pdf::master_text_pieces turns the text engine's layout of the notes
master's header, date, footer and page number into per-run, per-line
pieces scaled to the page; the Notes Page view paints them in their
sizes and colours. Stacked on #583.
2026-10-14 01:10:03 +03:00
Nikita Rakitin 11e63e31e1 Lay out master header/footer text with the text engine in PDF pages
Notes pages and handouts lay out the master's header, date, footer and
page-number placeholders with deckcraft-text (render::place_master_texts),
so their text wraps in the placeholder and keeps mixed run formatting,
drawn as visible glyphs. Stacked on #580.
2026-10-14 00:44:09 +03:00
Nikita Rakitin 32fcaec293 Preview the slide in Notes Master view; print master text in its own style
Notes Master view draws the current slide inside the slide-image
placeholder. Header, date, footer and page-number text on notes pages
and handouts (PDF and the Notes Page view) uses the placeholder's
resolved font, size, weight, slant and colour, scaled with the page.
Stacked on #577.
2026-10-14 00:40:09 +03:00
Nikita Rakitin 6fcf392370 Lay out notes pages and handouts from their masters
PDF notes pages and the Notes Page view put the slide (keeping its aspect)
and the notes where the notes master's slide-image and body placeholders
are, scaled from the notes size to the paper, and print the master's
header, date, footer and page number. PDF handouts print the handout
master's. Decks without these masters keep the old layout. Stacked on #573.
2026-10-14 00:35:26 +03:00
Nikita Rakitin c52b3142c4 Make PDF export ~2.8x faster without changing its bytes
krilla compressed each slide's print-resolution artwork on the export
thread; with its rayon feature (desktop only) the deflate runs in the
background while the next slide renders. The rendered pixels are also
moved into the image instead of copied.
2026-10-14 00:13:14 +03:00
skylar taylor-barrick c536c6e905 PDFW2: adopt shared PDF writer with explicit embedding errors 2026-10-13 13:39:33 -06:00
Nikita RakitinandCursor e6920f8ebe Print: choose paper size and orientation for notes and handouts
The Print page always laid notes pages and handouts out on portrait US
Letter. It now offers Letter, A4, Legal and A3 in portrait or landscape,
as PowerPoint's Print settings do, and the preview shows the chosen
page. file.export, app.print and the MCP export tool take the same
`paper` and `orientation` params; unknown values are an error. A notes
page keeps its slide within the top half of the page, so landscape
paper still leaves room for the notes. Full-page slides still print on
slide-shaped pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 21:43:54 +03:00
Sazid Al Bayazid e70fce996b Model: an exhausted id space refuses growth instead of duplicating ids (#407)
alloc_id bumped next_id with saturating_add: a presentation whose
next_id reached u32::MAX (a hostile file can arrive that way;
fix_next_id imports it) handed out that same id to every new slide,
shape, layout and media - duplicate ids, ambiguous references, silent
corruption on every later insert.

alloc_id now returns Option<u32> via checked_add, and every caller
refuses: the engine's insert/duplicate/media/layout commands answer
with a clear error naming the command, paste and duplicate re-id
helpers propagate it, media addition is fallible, and a fresh slide is
Option. The pptx export's synthesized blank layout is guarded the same
way. Loading keeps such a deck viewable: repair re-ids duplicate
slides while it can, and a duplicate it cannot re-id stays as it is -
growth is refused, and only that duplicate keeps its ambiguous id.

Renumbering the loaded graph was rejected: it needs the
cross-document reference remapping that issue #406 tracks.

Tests: model exhaustion (alloc_id None, fresh media refused, a new
slide refused), engine (slide.new, shape.insert, slide.duplicate and
edit.duplicate all refuse; the document holds no duplicate ids),
format repair (an unre-id-able duplicate stays visible).
2026-10-13 21:13:25 +06:00
MarekSpodBiedry dd404af8b5 PDF: map each glyph to its shaping cluster's text in ToUnicode (#164) 2026-10-11 23:39:32 +02:00
Brandon ThomasandClaude Opus 5.5 ae9d525bce Rename SlideCraft to DeckCraft: crates, apps, binaries, app id, file extension (.deckcraft; .slidecraft files still open), packaging, docs; ROADMAP alpha and parity estimates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:46:40 -04:00
Brandon ThomasandClaude Opus 5.5 639957c68a PDF export: slides, notes pages and handouts with selectable text layer, links and bookmarks; Export dialog PDF options
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 00:39:54 -04:00