From 249d5fe515ddb864582ec711106461c0e03ffe77 Mon Sep 17 00:00:00 2001 From: jdierkes Date: Wed, 26 Apr 2023 11:22:35 +0200 Subject: Fix grid-cell misalignment bug (#963) (#978) Having a table span multiple pages can cause an alignment bug in the table itself. If the first region in a cell in a grid row is empty, all other cells in this row will skip the first region. A misalignment bug can occur, since the calculation of all region sizes happen before the skip. The overall size allocated for the content of a cell with multiple regions and content in the first region thus is too little. Fixes #963 --- tests/ref/bugs/grid-2.png | Bin 10830 -> 12871 bytes tests/typ/bugs/grid-2.typ | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/ref/bugs/grid-2.png b/tests/ref/bugs/grid-2.png index ec2bd660..57160413 100644 Binary files a/tests/ref/bugs/grid-2.png and b/tests/ref/bugs/grid-2.png differ diff --git a/tests/typ/bugs/grid-2.typ b/tests/typ/bugs/grid-2.typ index bdcdf548..345ea6b1 100644 --- a/tests/typ/bugs/grid-2.typ +++ b/tests/typ/bugs/grid-2.typ @@ -9,7 +9,9 @@ rect(width: 100%, fill: red), rect(width: 100%, fill: blue), rect(width: 100%, height: 80%, fill: green), - [Hello], + [hello \ darkness #parbreak my \ old \ friend \ I], + rect(width: 100%, height: 20%, fill: blue), + polygon(fill: red, (0%, 0%), (100%, 0%), (100%, 20%)) ) --- -- cgit v1.2.3