fix(desktop): preserve editable PPTX font fidelity - #6840
Conversation
|
🧪 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
left a comment
There was a problem hiding this comment.
@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.
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
@importURL 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
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-packflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)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
apps/desktop/tests/main/pptx-editable-fidelity.test.tsmainand green on this branch? yesValidation
pnpm --filter @open-design/desktop test— 36 files passed; 331 tests passed, 1 skippedpnpm --filter @open-design/desktop typecheckpnpm typecheckpnpm guardgit diff --check origin/main...HEAD