Summary
word_cell_line_box (crates/office2pdf/src/render/typst_gen_text.rs) bails whenever a
cell paragraph carries style.line_spacing or style.line_box, so a table-cell paragraph
with w:spacing w:line gets no fixed line box at all — it falls back to Typst's default
line advance instead of Word's multiple × line-height box. The declared multiple is
therefore never applied inside cells, and the paragraph advance comes out short.
This is independent of #625 (which fixed the default block spacing leaking between
stacked cell paragraphs): both before and after that fix, a line-spaced cell paragraph
advances the same short distance.
Measured
Probe derived from tests/golden_mocks/business/sources/docx/02_contract_ko.docx by adding
<w:spacing w:line="360" w:lineRule="auto" w:after="30"/> to the signature-cell paragraphs
(1.5-line spacing, 9.5pt Malgun Gothic — a routine Korean-contract shape):
|
Word model |
office2pdf |
| advance across the paragraph break |
26.2pt (1.5 × 16.42pt EA line + 1.5pt w:after) |
21.53pt |
| deficit |
— |
−4.7pt (−18%) |
The same 21.53pt is produced by main and by the #625 branch, confirming the defect is the
missing fixed line box rather than the block-spacing model.
Reproduction
# add w:spacing w:line="360" w:lineRule="auto" to a multi-paragraph table cell
cargo run --release -p office2pdf-cli -- <probe>.docx -o out.pdf
mutool draw -F trace -o - out.pdf 1 # cell paragraph advance 21.53pt; Word 26.2pt
Expected
A cell paragraph with w:spacing w:line gets a fixed line box of the declared multiple of
the East Asian/Latin line height, exactly as body-flow paragraphs do.
Actual
word_cell_line_box returns None for those paragraphs, so no fixed box is emitted and the
advance falls back to the engine default — 18% short on a 1.5-line Korean cell.
Related: #625 #618
Found in: the #625 fix-PR adversarial review (one-factor probe over 02_contract_ko, 2026-07-31).
Summary
word_cell_line_box(crates/office2pdf/src/render/typst_gen_text.rs) bails whenever acell paragraph carries
style.line_spacingorstyle.line_box, so a table-cell paragraphwith
w:spacing w:linegets no fixed line box at all — it falls back to Typst's defaultline advance instead of Word's
multiple × line-heightbox. The declared multiple istherefore never applied inside cells, and the paragraph advance comes out short.
This is independent of #625 (which fixed the default block spacing leaking between
stacked cell paragraphs): both before and after that fix, a line-spaced cell paragraph
advances the same short distance.
Measured
Probe derived from
tests/golden_mocks/business/sources/docx/02_contract_ko.docxby adding<w:spacing w:line="360" w:lineRule="auto" w:after="30"/>to the signature-cell paragraphs(1.5-line spacing, 9.5pt Malgun Gothic — a routine Korean-contract shape):
w:after)The same 21.53pt is produced by
mainand by the #625 branch, confirming the defect is themissing fixed line box rather than the block-spacing model.
Reproduction
Expected
A cell paragraph with
w:spacing w:linegets a fixed line box of the declared multiple ofthe East Asian/Latin line height, exactly as body-flow paragraphs do.
Actual
word_cell_line_boxreturnsNonefor those paragraphs, so no fixed box is emitted and theadvance falls back to the engine default — 18% short on a 1.5-line Korean cell.
Related: #625 #618
Found in: the #625 fix-PR adversarial review (one-factor probe over 02_contract_ko, 2026-07-31).