Skip to content

fix(pptx): place vertical text correctly inside rotated frames and shapes#320

Merged
developer0hye merged 1 commit into
mainfrom
fix/pptx-vert-text-insets
Jul 18, 2026
Merged

fix(pptx): place vertical text correctly inside rotated frames and shapes#320
developer0hye merged 1 commit into
mainfrom
fix/pptx-vert-text-insets

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

  • Vertical (bodyPr vert) text kept its insets on the unrotated axes and anchored its column at the frame edge — inside preset shapes the column landed on the sloped boundary and clipped (follow-up to PPTX: render vertical text from bodyPr vert #269/PPTX: preserve text rotation inside shapes #222)
  • Remap the insets into the rotated coordinate system (90°/270°)
  • Center the column for vert text inside non-rectangular preset shapes, approximating the preset text rectangle we don't model; plain rectangular text boxes keep their bodyPr anchor

Test plan

  • New tests: inset remap in the emitted markup; preset-shape overlay centers the column; plain rect keeps its anchor (TDD)
  • Full workspace suite passes; fmt --check clean; clippy -D warnings clean

Visual verification (public shape-text-rotate fixture vs PowerPoint GT, 100 DPI)

GT Before After
gt before after

The word sits fully inside the pentagon like PowerPoint instead of clipping at its left slope.

After-image re-audit

Remaining deviations on this fixture, each filed per root cause: the style-matrix outline (lnRef) is not applied → #318; the pentagon preset geometry renders ~10% shorter than its box → #319. GT's column sits at ~35% from the left (preset text rect) vs our centered ~48% — accepted approximation, noted here.

Related: #286

🤖 Generated with Claude Code

…apes

Vertical (bodyPr vert) text kept its insets on the unrotated axes and
anchored its column at the frame edge, so inside preset shapes the
column landed on the sloped boundary and clipped. Remap the insets
into the rotated coordinate system, and center the column for text
inside non-rectangular preset shapes — approximating the preset text
rectangle we don't model; plain rectangular boxes keep their anchor.

Related: #286

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit 2d92370 into main Jul 18, 2026
14 checks passed
@developer0hye
developer0hye deleted the fix/pptx-vert-text-insets branch July 18, 2026 10:02
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