Add support for graphical blend modes
Description
Add support for standard graphical blend modes (e.g. multiply, screen, overlay) when compositing content.
Use Case
Procedurally generated graphics often rely on overlapping shapes with blend modes to create richer colour interactions. This would allow presentation templates and other designs to create these effects natively without resorting to generated SVGs or other workarounds.
For example:
#circle(radius: 80pt, fill: red, blend: multiply)
#circle(radius: 80pt, fill: blue, blend: multiply)
Currently, achieving this requires workarounds such as generating an SVG with the desired compositing.
PDF 1.4 onward has a transparency model with standard blend modes, so Typst could map these directly to the PDF graphics state rather than requiring rasterisation or SVG. See §7.5.2 https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.4.pdf
Source: typst/typst