Repository navigation
fix(pptx): prefer Office Calibri for missing theme fonts - #2042
Merged
Merged
Conversation
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PPTX documents can name a missing theme face such as
Expert Sans Regular; the current fallback selects Helvetica for this deck, while native PowerPoint uses Calibri. Add Calibri to the sans-serif fallback candidates so Office font-source ranking can select the installed Office face and align page 1 text metrics with PowerPoint. This resolves #2038; the separate page 2 hanging-indent defect found in the full-deck audit remains tracked in #2041.Related issue
Related: #2038
Testing
cargo test --locked -p office2pdf --lib render::font_subst::tests— 123 tests passed.cargo fmt --all -- --checkandgit diff --check— passed.python3 scripts/compare_layout.py ... --audit --fine-shift 0.5— page 1 passes; page 2 findings are classified below and tracked in PPTX: table-cell hanging indent is ignored #2041 and Tracker: sub-materiality visual deviations (revisit in bulk) #1874.python3 scripts/compare_render.py ... --cluster-report ... --cluster-dispositions ... --strict-clusters— page 1 passes with no material clusters; page 2's 16 clusters are all explicitly assigned to PPTX: table-cell hanging indent is ignored #2041.python3 scripts/compare_text_layer.py ...— normalized content is identical and has no codepoint-class delta.cargo test --locked --workspace --profile cirun was attempted but could not link after the local volume ran out of space; no local full-suite pass is claimed. CI will run the full suite.Visual impact
Visual audit
tests/fixtures/pptx/oxp_PB001-Input1.pptxpdftoppmat 150 DPIfixassets/bugfixes/issue-2038/layout-audit.jsonassets/bugfixes/issue-2038/render-clusters-page-1.json,assets/bugfixes/issue-2038/render-clusters-page-2.jsonassets/bugfixes/issue-2038/gt.jpgassets/bugfixes/issue-2038/before.jpgassets/bugfixes/issue-2038/after.jpgVisual comparison
Required inspection
Deviation audit
Checklist
Signed-off-byline