Skip to content

fix(pptx): import-fidelity fixes for think-cell / brand-template decks#75

Merged
karthikmudunuri merged 1 commit into
mainfrom
karthikmudunuri/pptx-import-fidelity
Jun 3, 2026
Merged

fix(pptx): import-fidelity fixes for think-cell / brand-template decks#75
karthikmudunuri merged 1 commit into
mainfrom
karthikmudunuri/pptx-import-fidelity

Conversation

@karthikmudunuri
Copy link
Copy Markdown
Member

What

A batch of PPTX importer fidelity fixes found by reviewing a real brand/think-cell master template (Intero) slide-by-slide against PowerPoint. Each item was verified against the source deck and covered by a regression test.

Text

  • Render run-level highlight (<a:rPr><a:highlight>) — the yellow think-cell callouts.
  • Apply cap="all"/"small" as a render-time letter-case transform, including when inherited from a placeholder's list style.
  • Derive font weight from weight-named families (Gilroy ExtraBold→800, … Medium→500, …) so substitute fonts render at the right heaviness.
  • A shape's own <a:lstStyle> defRPr now feeds run defaults (font/size/weight) for non-placeholder text boxes.

Bullets / lists

  • Map Wingdings bullet glyphs to Unicode (ü→✓, q→☐, §→▪, …).
  • Repeat a character bullet across in-paragraph line breaks; suppress the glyph on empty paragraphs; trim trailing empty paragraphs (no stray blank/dash lines).
  • Per-line rendering of hanging-indent bullets so multi-line items align.

Tables

  • Per-cell fills, text colours, per-side borders, proportional column widths / row heights, cell spans (gridSpan/hMerge/rowSpan/vMerge), per-cell vertical anchor, and rich per-cell runs (highlight / bold / ✓ glyphs / bullet breaks). Unfilled cells stay transparent instead of inheriting a sibling's fill.

Shapes

  • Skip shapes flagged hidden="1" (think-cell "do not delete" data objects).
  • Synthesise block-arrow paths (down/up/left/rightArrow).
  • Resolve outline colour from <p:style><a:lnRef> so dashed/outlined shapes draw.
  • Keep a text-bearing shape's fill, border, and corner radius (roundRect callouts, outlined chevrons) behind the text.
  • Honour <a:bodyPr><a:spAutoFit> no-wrap for short single-line labels; skip the arrow-tip text inset on no-fill label shapes.

Testing

  • pnpm --filter @textcortex/slidewise test91 passed / 9 skipped (14 new importer regression tests in round2/roundtrip).
  • pnpm typecheck clean.
  • Spot-verified visually slide-by-slide against the source deck.

Notes

  • Patch changeset included (.changeset/intero-import-fidelity.md).
  • Remaining font-substitution differences (exact Gilroy glyph metrics) are out of scope — the deck embeds no fonts; weight is approximated.

Broad set of importer fixes surfaced reviewing the Intero master template:
hidden-shape skipping, run highlight, cap/letter-case, weight-named font
families, per-cell table fills/borders/spans/widths/heights/anchors + rich
cell runs, Wingdings bullet glyph mapping, empty-paragraph bullet/blank-line
handling + trailing-empty trim, block-arrow paths, lnRef outline colour,
text-bearing shape fill/border/radius, spAutoFit no-wrap, and per-line
hanging-indent bullets.

See .changeset/intero-import-fidelity.md for the full list. Adds 14 importer
regression tests (round2/roundtrip).
@karthikmudunuri karthikmudunuri merged commit a085c8d into main Jun 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant