Compare commits

...
Author SHA1 Message Date
autocraft-bot[bot] 62c7baee64 Merge main (3035dda6) into the pull request
The only conflicted file was docs/gaps.md, and I resolved both conflicts

The only conflicted file was docs/gaps.md, and I resolved both conflicts. In the "Last reviewed" line I kept main's version, which has the new gap #1 corpus-harness entry. I put the PR's "gap 4: lowered pictures' line height qualified for exact spacing" entry at the front and set the last-updated date to 2026-11-27. In the change-log table I kept both rows, the PR's 2026-11-18 pagination gap #4 row and main's 2026-10-30 #29 row. The PR's gap #4 sentence, "with exact spacing, lowering one beyond its height doesn't move the baseline any further", was already in the merged file and is untouched. No conflict markers remain anywhere in the tree. The merge touched no code, so I didn't build or run tests.
2026-12-02 20:23:45 +00:00
Daniele Mori 3e5c6ce405 Gap 4 note: with exact spacing, lowering past the height doesn't move the baseline further
Lowering a picture up to its height can still move an exact-spacing line's
baseline; only lowering beyond it changes nothing more (#6091 review).
2026-11-27 11:43:49 +01:00
Daniele Mori 3fe111cc9f Lowered pictures: the comment and the gap note say what layout does now
measure()'s comment still said layout limits a lowered picture to its height;
the line's baseline (#5796 review).
2026-11-27 11:43:39 +01:00
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -516,8 +516,8 @@ impl<'e> Breaker<'e> {
// Word, measured with Arial at 10 and 20 pt, single, 1.15 and 1.5 spacing: a 30 pt picture
// alone takes 30, 30 + 0.15 and 30 + 0.5 times the font's height, lowered 10 or 30 pt or
// not; raised 10 pt, 10 more; a 6 pt one, the font's height; beside text and lowered
// 10 pt, 30. Not on a line lowered further than the picture's height, which layout limits
// to that height where Word's line keeps growing.
// 10 pt, 30; lowered 30 pt, a 6 pt one makes a 30 pt line (`drawing` leaves the lowering
// whole; exact spacing keeps it to the picture's height, see `extents`).
let spacing = if let LineSpacing::Multiple(m) = rp.line_spacing { Some(m) } else { None };
let pictures_alone = !text && obj_asc + obj_desc > 0.0 && spacing.is_some();
let below = if pictures_alone { obj_desc } else { desc };
+4 -3
View File
File diff suppressed because one or more lines are too long