fix(pptx): let a hanging-indent bullet separate with its tab alone - #793
Conversation
fixed_text_list_marker appends a space after the bullet glyph, and the hanging-indent branch then appends the tab that carries the gap to the indent. Together -- "* \t" -- they put the body one space past it. That branch now trims the trailing space. Only that branch: the non-hanging path gets no tab and still needs the space, and the ordered-list grid path has its own separator by design. Measured on office2pdf_introduction_ko page 28: the first body glyph moves from 101.60pt to 99.00pt, against a reference at 99.01pt, with the bullet itself at 72.00pt throughout. Related: #685 Signed-off-by: developer0hye <developer.0hye@gmail.com>
|
Follow-up on the "what is not verified" section — I tried to close that gap and could not, so recording the attempt. First finding, which sharpens the mechanism: removing the space does not always move visible text. The tab advances to a stop, so where Across whole documents the other ten fixtures do move visible glyphs, so the reach is real: Second finding: I could not establish direction for them. Matching our glyphs to the LibreOffice reference by character and nearest baseline gives mean |dx| of 24–45pt on those decks, which is far too large to be real — the matcher is pairing repeated characters across the page rather than corresponding glyphs. The numbers it produced disagree with each other ( So the position in the PR body stands unchanged: measured exactly on one deck, mechanism understood and not a tuned constant, breadth confirmed but direction unverified elsewhere. |
|
Correction to the blast-radius number in this PR body. I reported "11 of 73" fixtures changed. That sweep was run against a stale My local Scale of the distortion, measured while sweeping #799: that sweep read 5 of 69 against the stale binary and 3 of 69 once Affected: the sweep counts in #793 through #797. This one's "11 of 73" is the least trustworthy, being the earliest after the break. Not affected: every targeted before/after in those PRs, each of which was measured against a committed native-Office ground truth rather than against a locally built |
Summary
fixed_text_list_markerappends a space after the bullet glyph, and thehanging-indent branch of
prepend_fixed_text_list_marker_runthen appends thetab that carries the gap to the indent. Both together —
"• \t"— put the bodyone space past the indent.
Measured
tests/fixtures/pptx/office2pdf_introduction_ko.pptxpage 28. First body glyphof the first bullet, from
mutool draw -F tracewith the full affine applied:The bullet itself sits at 72.00pt in all three. 2.59pt of excess removed, landing
0.01pt from the reference.
Change
The hanging-indent branch trims the marker's trailing space before appending the
tab. Only that branch: the non-hanging path gets no tab, so it still needs the
space, and the ordered-list grid path has its own separator by design.
Blast radius, and what is not verified
11 of 73 chart- and text-bearing fixtures render differently — every unordered
list with a hanging indent, which is the intended reach. I measured the indent
exactly on the audited deck only. On the others I confirmed the output changes
but did not verify each moves toward its reference; the mechanism is identical
in all of them (one redundant separator removed where a tab already spans the
gap), and it is not a tuned constant, but that breadth is stated rather than
demonstrated.
Tests
One, failing before the change. The tab compiles into segments, so it asserts
the marker is the whole first segment —
let tab_segment_0 = [•]— and never[• ].Visual impact
Visual audit
tests/fixtures/pptx/office2pdf_introduction_ko.pptxpdftoppmat 150 DPIThe GT image is a LibreOffice 24.2.7.2 render, not a PowerPoint export. It
agrees with this issue's own native-Office measurement on the one number that
matters here: the body indent.
Hairline inventory: page 28 has no element at or below 1pt; it is text and
bullet glyphs only.
The 5% fuzz sweep moves 113,629 → 113,590 against the reference, which measures
nothing useful here: the page's Korean glyphs differ from the reference's
throughout for font reasons, and a 2.6pt shift of one column of text is lost in
that. The glyph-x table above is the evidence.
Related: #685