paragraph_layouter placed lines at page.border_size while sizing them to available_width, which subtracts both paddings. Text therefore started flush against the left border and the entire padding budget accumulated on the right, so lines broke well short of the right border. Page now describes its content box directly - content_origin, content_rect and remaining_height - and the layouters use it instead of each recomputing the geometry from border_size. The four block layouters had all been computing remaining space as size[1] - y_offset - border_size, subtracting the border but not the bottom padding, so every block type could be placed into the bottom padding; remaining_height fixes that too. Page also gains an origin, defaulting to (0, 0). That is inert for a top-level page but lets a page be positioned inside another surface, which table cells need in order to be laid out by the normal engine. Golden images regenerated: content now sits inside the padding on all sides.
88 KiB
540x1300px
88 KiB
540x1300px