diff options
| author | PgBiel <9021226+PgBiel@users.noreply.github.com> | 2024-12-04 07:00:04 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-04 10:00:04 +0000 |
| commit | 884c02872ce9d7432c3b67a920011cf385ce70b2 (patch) | |
| tree | b5e2e28510780135cc492575f63727a096d1f98e /tests | |
| parent | cda94ab40505a2d812c3a743a8d916bcfe4484c3 (diff) | |
Fix text fill within `clip: true` blocks in PNG export (#5502)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/block-clip-text.png | bin | 1268 -> 908 bytes | |||
| -rw-r--r-- | tests/ref/block-clipping-multiple-pages.png | bin | 2047 -> 2029 bytes | |||
| -rw-r--r-- | tests/ref/issue-5499-text-fill-in-clip-block.png | bin | 0 -> 1502 bytes | |||
| -rw-r--r-- | tests/suite/text/font.typ | 31 |
4 files changed, 31 insertions, 0 deletions
diff --git a/tests/ref/block-clip-text.png b/tests/ref/block-clip-text.png Binary files differindex 744ce0f2..8c82bc30 100644 --- a/tests/ref/block-clip-text.png +++ b/tests/ref/block-clip-text.png diff --git a/tests/ref/block-clipping-multiple-pages.png b/tests/ref/block-clipping-multiple-pages.png Binary files differindex ffe2fd08..0b6e7c85 100644 --- a/tests/ref/block-clipping-multiple-pages.png +++ b/tests/ref/block-clipping-multiple-pages.png diff --git a/tests/ref/issue-5499-text-fill-in-clip-block.png b/tests/ref/issue-5499-text-fill-in-clip-block.png Binary files differnew file mode 100644 index 00000000..5f7962d3 --- /dev/null +++ b/tests/ref/issue-5499-text-fill-in-clip-block.png diff --git a/tests/suite/text/font.typ b/tests/suite/text/font.typ index 443be6ed..5c972ff3 100644 --- a/tests/suite/text/font.typ +++ b/tests/suite/text/font.typ @@ -81,3 +81,34 @@ I // Warning: 17-34 Typst's default font has changed from Linux Libertine to its successor Libertinus Serif // Hint: 17-34 please set the font to `"Libertinus Serif"` instead #set text(font: "Linux Libertine") + +--- issue-5499-text-fill-in-clip-block --- + +#let pat = pattern( + size: (30pt, 30pt), + relative: "parent", + square( + size: 30pt, + fill: gradient + .conic(..color.map.rainbow), + ) +) + +#block(clip: false, height: 2em, { + text(fill: blue, "Hello") + [ ] + text(fill: blue.darken(20%).transparentize(50%), "Hello") + [ ] + text(fill: gradient.linear(..color.map.rainbow), "Hello") + [ ] + text(fill: pat, "Hello") +}) +#block(clip: true, height: 2em, { + text(fill: blue, "Hello") + [ ] + text(fill: blue.darken(20%).transparentize(50%), "Hello") + [ ] + text(fill: gradient.linear(..color.map.rainbow), "Hello") + [ ] + text(fill: pat, "Hello") +}) |
