Skip to content

Shapes: chevron text rectangle per presetShapeDefinitions - #643

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:preset-text-rects
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:preset-text-rects

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Found by re-ranking the 116-slide LibreOffice comparison (see #638) for non-chart mismatches.

A chevron's text box ran from the notch to halfway along the point (d .. w − d/2). presetShapeDefinitions give il = ?: dx x1 l, ir = ?: dx x2 r with dx = x2 − x1:

  • When the notch and the point's base don't meet, the text box spans the notch to the point's base (x1 .. x2).
  • Once they meet or cross (any chevron as tall as it is wide at the default 50 %), the text box spans the whole width.

So a square chevron's 'Shape 4' was drawn a couple of letters per line in a sliver. Now it's set on one line across the shape, as LibreOffice (and the standard) lay it out. homePlate was already right and is now covered by the test too.

Test: chevron_text_rectangle_follows_the_standard (wide, square, homePlate). cargo xtask ci passed (6/6). Checked by eye against LibreOffice's render of a python-pptx shapes slide.

Other non-chart differences seen (not changed here):

  • LibreOffice-only quirks: it prints placeholder prompt text, and it drops the bold first-row text of table styles. PowerPoint keeps both, and so do we.
  • Unverified without PowerPoint: whether flips mirror a rotWithShape="0" linear gradient (LibreOffice does, our renderer deliberately doesn't), and the radius of a path="circle" gradient focused on an edge (Sunset template).

@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @NikitkaRa! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
* docs: register the MCP server from an installed release

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: drop the third-party link; the Windows path is the default install folder

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: drop the third-party link; the Windows path is the default install folder

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: drop the third-party link; the Windows path is the default install folder

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants