diff options
| author | bluebear94 <uruwi@protonmail.com> | 2023-08-02 18:45:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-03 00:45:40 +0200 |
| commit | c5a103867d78e61f8d9c4859eb8e668accc4cbd0 (patch) | |
| tree | a70f54f9cf7a6ffebce05c416d7e69899aa5f40d /tests | |
| parent | 39e101f0af21424eb893d27a634ee7f6a8a0d5f1 (diff) | |
layout::par::finalize: Bound allotted width when fitting to width (#1828)
Sometimes, optimized line breaking outputs lines that are wider
than the allotted width so that spacing between words can be
narrowed to fit. However, the width calculation for the fit-to-width
case does not account for this, causing the resulting width to exceed
the width of the region. This commit takes the minimum of the
calculated width with the width of the region. Fixes #1825.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/visualize/shape-rect.png | bin | 9691 -> 247247 bytes | |||
| -rw-r--r-- | tests/typ/visualize/shape-rect.typ | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/ref/visualize/shape-rect.png b/tests/ref/visualize/shape-rect.png Binary files differindex 17675400..48d40447 100644 --- a/tests/ref/visualize/shape-rect.png +++ b/tests/ref/visualize/shape-rect.png diff --git a/tests/typ/visualize/shape-rect.typ b/tests/typ/visualize/shape-rect.typ index 951d5bea..17dd0f92 100644 --- a/tests/typ/visualize/shape-rect.typ +++ b/tests/typ/visualize/shape-rect.typ @@ -53,3 +53,11 @@ --- // Error: 15-21 expected length, color, dictionary, stroke, none, or auto, found array #rect(stroke: (1, 2)) + +--- +#set page(width: 17.8cm) +#lorem(100) +#rect(lorem(100)) +#set par(justify: true) +#lorem(100) +#rect(lorem(100)) |
