typst / typst/typst

No anti-aliasing on circles filled with sharp gradients in PNG export

Open
#8,684 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug png visualize
Dominant language
Rust
Stars
56.1k
Forks
1.7k
Avg merge
3d 10h
Merged PRs (30d)
22

Description

Description
#circle(fill: red)
#circle(fill: gradient.linear(red, red).sharp(2))

When exporting a PNG, the second circle does not have anti-aliasing:

Two red circles. The second one does not have anti-aliasing.
Operating system

No response

Typst version
  • I am using the latest version of Typst

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the PNG export with the provided Typst snippet and compare the plain circle with the circle using the sharp gradient. Then trace the PNG rendering path to find where anti-aliasing differs for gradient-filled shapes. Done means the sharp-gradient circle exports with anti-aliased edges without regressing the plain circle.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.