Skip to content

Part 5a: Gradients on text with relative: auto or relative: "parent"#2364

Merged
laurmaedje merged 10 commits intotypst:mainfrom
Dherse:gradient-text-parent
Oct 12, 2023
Merged

Part 5a: Gradients on text with relative: auto or relative: "parent"#2364
laurmaedje merged 10 commits intotypst:mainfrom
Dherse:gradient-text-parent

Conversation

@Dherse
Copy link
Contributor

@Dherse Dherse commented Oct 11, 2023

Tracking issue: #2282

This introduces the ability to set gradients on text but only with the "relativeness" being set to the parent (or auto). Since glyph-by-glyph might be quite difficult to get merged (it will most likely require some discussion), I am opening this first PR. Gradients on text are simply used by setting the fill param of text.

This PR also adds a number of fixes to the way container transform matrices are handled in all three targets and fixes major bug in all three. While these bug were almost impossible to trigger with gradients on fill they became quite obvious on text (as it broke the gradients altogether).

image

@Dherse Dherse mentioned this pull request Oct 11, 2023
13 tasks
Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
@Dherse
Copy link
Contributor Author

Dherse commented Oct 12, 2023

@laurmaedje Before merging, there is an issue with PDF conic gradients on text, you can already merge and I’ll fix it in a second PR, or you can wait until I fix it in this one. The issue is very insignificant: the angle correction is wrong in PDF.

@laurmaedje
Copy link
Member

I'll wait. I haven't reviewed yet, will do that now.

@Dherse Dherse requested a review from laurmaedje October 12, 2023 13:22
@laurmaedje laurmaedje merged commit a596663 into typst:main Oct 12, 2023
@laurmaedje
Copy link
Member

Thank you! 😀

@Dherse Dherse deleted the gradient-text-parent branch November 2, 2023 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants