Skip to content

fix(pptx): preserve pair kerning across spaces - #1589

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1582-cross-space-kerning
Sep 6, 2026
Merged

fix(pptx): preserve pair kerning across spaces#1589
developer0hye merged 1 commit into
mainfrom
fix/issue-1582-cross-space-kerning

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

Preserve the active font's pair kerning on both sides of PowerPoint spaces while retaining the 1/8pt advance grid. Arial on Aug now fits an 88.5pt box as native PowerPoint does; previously it wrapped before Aug. Combine pair and grid adjustments in one weak spacing element so both disappear at line boundaries and spaces remain searchable.

Related: #1582.

Testing

  • Two portable regressions failed before the fix and pass after it: both sides of spaces, repeated spaces, kerning disabled, two font sizes, wrapping and new-line origins.
  • cargo test --locked --workspace --no-fail-fast: all integration/doc suites passed; one old marker helper-call assertion required updating. The corrected cargo test --locked --workspace --lib passed all 2,892 library tests, including observable marker/body placement. Combined validation: 3,491 passed, 15 ignored.
  • cargo clippy --locked --workspace --all-targets -- -D warnings, cargo fmt --all -- --check, and git diff --check passed.
  • Twenty-nine native PowerPoint 16.112.3 probe exports match candidate line contents. Checked word origins differ by at most 0.011pt horizontally and 0.12pt vertically. All native integrity and re-zip control gates passed.
  • Sixteen-page layout audit passes at 0.5pt; all strict pixel-cluster reports pass. Searchable text matches all 2,337 normalized codepoints.
  • Documentation freshness review: PASS. Reproduction and provenance are in the issue evidence README.

Visual impact

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

Visual audit

  • Issue: PPTX: word-level width rounding drops kerning across spaces #1582
  • Fixture: tests/golden_mocks/business/sources/pptx/03_product_launch_en.pptx; one-factor letter and box-width probes reproduced in the evidence README
  • Page(s): 1-16
  • Renderer and DPI: pdftoppm, 150 DPI; native PowerPoint 16.112.3
  • Evidence mode: fix
  • Layout audit report: assets/bugfixes/issue-1582/layout-audit.json
  • Render cluster reports: assets/bugfixes/issue-1582/render-clusters-page-1.json, assets/bugfixes/issue-1582/render-clusters-page-2.json, assets/bugfixes/issue-1582/render-clusters-page-3.json, assets/bugfixes/issue-1582/render-clusters-page-4.json, assets/bugfixes/issue-1582/render-clusters-page-5.json, assets/bugfixes/issue-1582/render-clusters-page-6.json, assets/bugfixes/issue-1582/render-clusters-page-7.json, assets/bugfixes/issue-1582/render-clusters-page-8.json, assets/bugfixes/issue-1582/render-clusters-page-9.json, assets/bugfixes/issue-1582/render-clusters-page-10.json, assets/bugfixes/issue-1582/render-clusters-page-11.json, assets/bugfixes/issue-1582/render-clusters-page-12.json, assets/bugfixes/issue-1582/render-clusters-page-13.json, assets/bugfixes/issue-1582/render-clusters-page-14.json, assets/bugfixes/issue-1582/render-clusters-page-15.json, assets/bugfixes/issue-1582/render-clusters-page-16.json
  • Reference exporter differences: None
  • Fine-detail threshold: 0.5pt
  • Layout audit page count: Pass
  • Layout audit text flow: Pass
  • Layout audit visible fills: Pass
  • Layout audit rectangle geometry: Pass
  • Layout audit large shifts: Pass
  • Layout audit fine shifts: Pass
  • New follow-up issues found in this audit: None
  • Model vision findings: Full-page context, full-scale body crops and 5% pixel sweeps show corrected suffix spacing and two-line wraps. Heading and timeline regions, bullets, indentation, font emphasis and chart hairlines remain intact. One unchanged gold legend-edge cluster on page 3 is explicitly accepted as photo-resampling; bounded body glyph-edge fragments remain below the material floor. No remaining converter deviation was found.
  • GT: assets/bugfixes/issue-1582/gt.jpg
  • Before: assets/bugfixes/issue-1582/before.jpg
  • After: assets/bugfixes/issue-1582/after.jpg
  • Native: None
  • Compare: assets/bugfixes/issue-1582/compare.jpg

Visual comparison

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 sixteen collection pages
Element presence Matches GT: headings, timeline, chart and bullets
Position/size Fixed: space-pair origin drift and resulting wraps
Rotation/flip No deviation observed
Fill Matches GT: unchanged fills; accepted legend-edge resampling
Stroke/border Matches GT: fine axes, ticks and legend outlines
Shape outline geometry Matches GT
Text content Matches GT: exact normalized searchable text
Font family/weight/style Matches GT: Arial body and heading emphasis
Text color Matches GT
Alignment Matches GT: preserved bullets and new-line origins
Line/paragraph spacing Matches GT: native baseline quantization within 0.12pt
Clipping/overflow No deviation observed

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 75d4046 into main Sep 6, 2026
18 checks passed
@developer0hye
developer0hye deleted the fix/issue-1582-cross-space-kerning branch September 6, 2026 05:28
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