New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃寛 Gradient - Tracking issue #2282
Comments
Also closes #443 (with Part 8). |
Also closes #260. I'd even go as far as stating that it already closes it. |
It was decided in discussion with @laurmaedje that we would not support (at least now) glyph-by-glyph gradients as they're extremely heavy file-size wise, kind of ugly, and difficult to get right. Starting here on Discord: https://discord.com/channels/1054443721975922748/1088371867913572452/1161943386048188436 |
This looks fab! Would building it be as simple as pointing rust to a crate from your fork? Afraid I've not much experience with the language. I would like some gradients in my document, so I can do some basic testing. |
@stellarpower Most of the gradient work has already landed on main, so if you just compile Typst from main you can just use it. |
Alright, thanks! I will just try building the master branch then. |
As of a596663, it seems that I can fill a box with a gradient ( |
@stellarpower With regards to line, they generally you work, you can find an example here but I generally recommend keeping simple linear gradients on line as line technically have a zero width which makes other gradient look... funky?
Truth be told, there is essentially no difference wrt. the "complexity" of the stroke for gradient fills. Currently, gradient fills in parent mode will work on any path you throw at them, it's only when applied in I should also mention that my |
Okay, so I have to do the It seems that fill accepts a gradient or a color, whilst line accepts a color or a stroke (which can be based off a gradient itself), but not a gradient. Thanks for the advice on your branch, I'll stay clear then. |
Also consider |
I think we just need to add the missing gradient -> stroke cast. Seems like an oversight. |
Should we close this? |
I was planning on working on some more features, namely pattern fills in the upcoming weeks just haven't found the motivation just yet |
Gradient progress report:
relative: "parent"
aka single gradient on all of the text) Part 5a: Gradients on text withrelative: auto
orrelative: "parent"
聽#2364Part 5b: Gradient on text (relative: "self"
aka per-glyph gradients)The vast majority of those features (all of them in SVG) are available on my gradient branch. However, in this branch the layout engine is completely broken, which I have fixed in these PRs, but didn't bother to on my experimental branch.
The reason why gradients are split up is because part 1 and 2 already account for close to 5000 lines added, the size and complexity of gradients simply balloons when you consider that we support three different export targets, each with their own quirks and limitations that need to be worked around.
This is just a tracking issue I can point to in other gradient PRs ;)
The text was updated successfully, but these errors were encountered: