Repository navigation
fix(pptx): custGeom export — map path coords to shape EMU extent, drop bogus fill="darken" - #66
Merged
Conversation
…p bogus fill=darken
This was referenced May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the eon-deck fidelity report. I round-tripped each of the three reported
serializeDeckbugs through real reproductions — here's what each turned out to be, and the one with genuine emission bugs.#2 custGeom blank — fixed here (two real emission bugs)
Reproduced the multi-subpath / even-odd / EMU-scale case and inspected the emitted OOXML:
fill="darken"was wrong.<a:path fill="…">is a shading hint (none/norm/lighten/darken) — custGeom has no even-odd winding flag. The code emittedfill="darken"forfillRule: "evenodd", which silently darkened the shape and trips LibreOffice, without ever cutting the hole. Removed — defaultnormshading; holes come from subpath direction ind.<a:path w/h>was left at the source viewBox while points stayed in that space. PowerPoint emits custGeom withw/h= the shape's EMU extent, and LibreOffice only maps the path onto the box correctly when they line up.svgPathToOoxmlnow rescales points into the shape's EMU extent.Honest caveat on the bicycle specifically: for the eon bicycle,
pxToEmu(boxW) ≈ viewWalready (776px → 4,927,600 ≈ 4,930,510), so the rescale is ~a no-op there — meaning thefill="darken"removal is the likelier culprit for that shape, but I can't 100% confirm without the file. If the bicycle still renders blank after this, please attacheon-deck.pptx(or the bicycle's fullpath.d+viewW/viewH+ shapew/h) and I'll repro the exact path.#1 radial — not an emission bug (verified)
Reproduced your exact 4-stop radial with no source.
serializeDeckdoes emit it:The grep was for
<a:path type="circle">— the attribute ispath="circle", nottype=, so it reads 0. Also note this deck's stops are mostly transparent (alpha0x59≈35%,0x00,0x00,0x59), so it renders faint by design. If a specific radial still doesn't paint, it's most likely LibreOffice's known weak support for<a:path path="circle">radials rather than emission — happy to add a compatibility shim if you can confirm against PowerPoint.#3 fonts — works when
deck.fontsis populated (verified)Reproduced with a
deck.fontsentry: output hasppt/fonts/*and<p:embeddedFontLst>inpresentation.xml. So embedding is wired correctly. The gap is an emptydeck.fonts: either the source deck only references the brand font by name (no embedded bytes → the library has nothing to embed), or the largefonts[]array got dropped on JSON upload (you mentioned fixing truncation). To embed, ensure the deck JSON you serialize carriesfonts[{ family, data: "data:font/…;base64,…" }].I skipped the auto weight→named-face rename (300/500/600 → "…Light/Medium/SemiBold"): most font families don't follow that naming, so synthesising
"EON Brix Sans Medium"would reference a face that may not exist and make matching worse. That mapping is best owned by the host, which knows its real family names.Tests
synth-writers: custGeom path emits<a:path w/h>at the shape's EMU extent and nofill="darken".tsc -bclean.Note: depends on the gradient/arc/font work from #64 (already merged + released in #65); this branch is off the post-#65
main.