Skip to content

fix(desktop): preserve editable PPTX font fidelity - #6840

Open
Siri-Ray wants to merge 1 commit into
mainfrom
agent/fix-editable-pptx-font-fidelity
Open

fix(desktop): preserve editable PPTX font fidelity#6840
Siri-Ray wants to merge 1 commit into
mainfrom
agent/fix-editable-pptx-font-fidelity

Conversation

@Siri-Ray

Copy link
Copy Markdown
Contributor

Fixes #6839

Why

While reproducing a real editable PPTX export in WPS, imported Google fonts were missing and a heading with an authored line break rewrapped into the body copy. The export looked correct in Open Design but changed substantially after opening the .pptx.

The editable export path parsed an @import URL as if the semicolon inside the quoted Google Fonts CSS2 query ended the declaration. That truncated the import, so the exporter never discovered most of the font faces. The generated PPTX therefore fell back to local Office fonts with different metrics. Headings containing <br> could also soft-wrap a second time after conversion, producing the overlap shown in the report.

What users will see

Using Export → Export as PPTX now embeds compatible imported Google Fonts in editable decks and preserves authored heading line boundaries. The existing export entry point and file format are unchanged.

Surface area

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys (see TRANSLATIONS.md for the locale workflow)
  • New top-level dependency — adding any new entry to the root package.json (dependencies or devDependencies); workspace-package package.json files are out of scope. Include a paragraph on what we get vs. what bytes we ship (see CONTRIBUTING.md → Code style)
  • Default behavior change — changes what existing users experience without opting in (default model, default setting, file/SQLite schema, auto-network on startup, auto-install)
  • None — internal refactor, docs, tests, or translation update only

Screenshots

No UI entry point changed. The real seven-slide deck from the report was exported through an isolated Open Design runtime and rendered for visual verification.

Bug fix verification

  • Test path that reproduces the bug: apps/desktop/tests/main/pptx-editable-fidelity.test.ts
  • Did the test go red on main and green on this branch? yes
  • Coverage includes quoted import URLs containing semicolons, imported stylesheet collection, compatible regular/Latin font-face selection, and heading wrap preservation.

Validation

  • pnpm --filter @open-design/desktop test — 36 files passed; 331 tests passed, 1 skipped
  • pnpm --filter @open-design/desktop typecheck
  • pnpm typecheck
  • pnpm guard
  • git diff --check origin/main...HEAD
  • Real seven-slide export: embedded Fraunces, JetBrains Mono, and Source Sans 3; rendered slide scan reported no overflow

@lefarcen
lefarcen requested a review from mrcfps August 13, 2026 09:33
@lefarcen lefarcen added size/L PR changes 300-700 lines risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps type/bugfix Bug fix labels Aug 13, 2026
@Siri-Ray
Siri-Ray marked this pull request as ready for review August 13, 2026 09:39
@Siri-Ray
Siri-Ray requested a review from a team as a code owner August 13, 2026 09:39
@lefarcen lefarcen added the needs-validation Runtime change detected; needs human or /explore agent validation. label Aug 13, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

🧪 Queued for QA validation — this export path changes the editable PPTX output users open in WPS/PowerPoint, so we want a manual QA pass before merge.

Nothing needed from you right now; we'll update here once validation is done.

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Siri-Ray thank you for a careful, well-anchored fix — this is a really nice piece of detective work on a nasty export-only failure.

I reviewed the changed ranges in apps/desktop/src/main/deck-capture.ts and apps/desktop/tests/main/pptx-editable-fidelity.test.ts against #6839. The quoted @import parser keeps CSS2 axis semicolons inside the URL, the desktop-process prefetch is limited to fonts.googleapis.com and asks for TTF-compatible faces, and importedFontFaceCss then keeps one regular/complete-or-Latin face per family. That matches the vendored embedder, which only writes a p:regular slot and can fail when it tries to merge italic/bold/subset files. stabilizeAuthoredHeadingLines maps authored <br> onto white-space: nowrap / wrap: false while the converter still emits breakLine runs, which is the right way to stop the second soft wrap. The new tests cover the semicolon truncation, UA-filtered prefetch, face selection, and heading wrap cases.

No correctness, safety, or test issues that should block merge. Really solid work on a high-risk export path.

🔁 Powered by Looper · runner=reviewer · agent=grok-build · An autonomous AI dev team for your GitHub repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-validation Runtime change detected; needs human or /explore agent validation. risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps size/L PR changes 300-700 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Editable PPTX export drops imported fonts and rewraps headings

3 participants