mirror of
https://github.com/dolanmiu/docx.git
synced 2026-11-30 16:47:55 +01:00
* fix(layout): make a paragraph's last line as tall as its text, not its mark The layout made the last line of every paragraph at least as tall as the paragraph's mark. Word and LibreOffice don't: a line of 8-point text in a paragraph whose mark is 11 points is 8 points tall, as a document of probes saved as a PDF from Word 16 for Mac and laid out by LibreOffice 26.8 showed. Text given a smaller size than its style's, as a TextRun's size does, was laid out too tall, which put a heading of the text-and-spacing demo on the page after Word's. The mark now only sets the height of a line with no text on it, such as an empty paragraph's, or a page break's at the end of a paragraph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NijyutGmb3bNR3dNRWJken * ci: draw Calibri Light in Carlito in the shape demos' LibreOffice LibreOffice has no font for Calibri Light, the heading font of Office's theme and of docx's default heading styles, and drew it in Noto Serif, whose lines are 12% taller. So the layout comparison checked docx/layout, which measures Calibri Light as Calibri, against headings taller than Word's: Calibri Light is as tall as Calibri. A fontconfig alias makes LibreOffice draw it in Carlito, as wide and tall as Calibri. The title of charts-in-templates, in the template's heading font, is now drawn in Carlito, so its reference image is drawn again. The other 30 pages don't change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NijyutGmb3bNR3dNRWJken --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>