Skip to content

fix(pptx): retain fractional text-story origins - #1586

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1583-text-origin
Sep 6, 2026
Merged

fix(pptx): retain fractional text-story origins#1586
developer0hye merged 1 commit into
mainfrom
fix/issue-1583-text-origin

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

Preserve fractional text-box origins when seating top-anchored PowerPoint
paragraphs. A frame at 144pt with a 3.6pt inset now retains its 147.6pt story
origin: the lecture heading moves from 163pt to 162.6pt (native: 162.48pt),
and later paragraphs and bullets follow the same local grid. All affected
paragraph starts agree with native within 0.12pt.

Native quarter-point translation probes distinguish story-relative rounding
from page rounding. The fix captures the story origin for top anchors and
passes it through the existing paragraph and marker helpers. Typst still
chooses wrapping and layout height.

Related issue

Related: #1583. Remaining independent defects: #1581, #1582, #1584.
The separate physical-line rounding defect in #1584 remains visible after
correcting paragraph origins: product continuations move from −0.16pt to
+0.44pt and from −0.28pt to −0.68pt relative to native. This PR records those
residuals explicitly and keeps the root causes separate.

Testing

  • cargo test --locked --workspace --no-fail-fast: passed (3485 tests; 15 ignored).
  • cargo clippy --locked --workspace --all-targets -- -D warnings: passed.
  • cargo fmt --all -- --check and git diff --check: passed.
  • RED/GREEN translation regression: three plain paragraphs and three bullets,
    two embedded font families/sizes, and 0.25/0.50/0.75pt translations.
  • All 85 fixed-page text-box tests passed.
  • Eleven-page native comparison; searchable text matches (1,608 normalized
    codepoints, identical codepoint census).

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added

Visual audit

Visual comparison

Each image contains the eleven full pages in collection order.

GT Before After
GT Before After

Required inspection

  • Rendered all evidence at 150 DPI or higher
  • Stored progressive JPEG quality 86 assets with metadata stripped
  • Used Codex/Claude vision to inspect the full GT/output pages, diff, and matched crops
  • Inspected matched region crops at full resolution
  • Ran compare_layout.py --audit --fine-shift PT and dispositioned every fine/large text-instance shift, rectangle geometry deviation, painted-text visibility mismatch, and visible-fill occlusion
  • Ran compare_render.py --cluster-report PATH --strict-clusters and dispositioned every material 5% fuzz diff cluster by explicit ID
  • Inventoried hairlines and border dash styles
  • Inventoried font weight, italic, and underline emphasis

Deviation audit

Check Result
Page count/order Matches GT: all eleven pages in the documented fixture order.
Element presence Matches GT: text, markers, shapes and pictures remain present.
Position/size Remaining: #1581, #1582, #1584; advance-grid, cross-space kerning and continuation-line rounding respectively.
Rotation/flip Matches GT.
Fill Matches GT: covers, cards, chart fills and Korean panel.
Stroke/border Matches GT: thin axes, ticks, legend outlines and bar edges remain present.
Shape outline geometry Matches GT.
Text content Matches GT: normalized searchable text and codepoint census agree.
Font family/weight/style Matches GT: same title/body weights and Korean emphasis in full-scale crops.
Text color Matches GT.
Alignment Fixed: paragraphs and bullets retain the fractional story origin.
Line/paragraph spacing Remaining: #1584; wrapped continuation-line rounding.
Clipping/overflow Matches GT on the original eleven-page fix collection.

Checklist

  • Commits include a Signed-off-by line
  • PR scope contains one root cause
  • Remaining converter or harness deviations each reference an open issue

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit a45fda7 into main Sep 6, 2026
18 checks passed
@developer0hye
developer0hye deleted the fix/issue-1583-text-origin branch September 6, 2026 02:46
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