From 9d85ddb2132fc87cb1239def18faccd888eada5b Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Sat, 8 Aug 2026 16:32:59 +0000 Subject: [PATCH] docs: record what dropping the block strut costs Measured against LibreOffice on a purpose-built fixture the rule is right, and on the corpus it is a loss: one fixture gains 22 issues. The strut is also what holds up a line of no runs and, through the reserved ::after, the paragraph mark on the last line. --- tests/render-parity/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/render-parity/README.md b/tests/render-parity/README.md index 06123fa..391fb4e 100644 --- a/tests/render-parity/README.md +++ b/tests/render-parity/README.md @@ -104,6 +104,14 @@ LibreOffice's 48, with 62 line-level differences, most of them the justification the last. The mark's font rides the block (`blockFontSize.ts`), and a paragraph whose runs all agree takes theirs — which covers everything the corpus has. A paragraph of *mixed* sizes still struts at the block's. + Attempted and **reverted**: `line-height: 0` on the block with the content's line-height + restored by an inline decoration does drop the strut, and measured right on a purpose-built + fixture (a 24pt run over 10pt text came to 62.1pt against LibreOffice's 61.8, from 69.0). + It cost the contract 22 issues all the same. Two things the strut was quietly holding up: + a line of no runs at all — two breaks in a row — collapses to nothing, and the reserved + paragraph mark is an `::after` on the block, so the same rule takes the *last* line's + height away with it. An empty widget span at the block's end gets that line back but not + to the same value. Whatever replaces the strut has to carry both. - **Charts and metafiles are placeholders.** No renderer exists for either, so an undrawable frame keeps its box and its label but not its picture (`imageFormats.ts`). Exporting writes the placeholder back out — the original is gone from the moment it