Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in #show raw: set text() #2259

Closed
1 task done
l1mey112 opened this issue Sep 29, 2023 · 5 comments · Fixed by #2262
Closed
1 task done

Regression in #show raw: set text() #2259

l1mey112 opened this issue Sep 29, 2023 · 5 comments · Fixed by #2262
Labels
bug Something isn't working text Text layout, shaping, internationalization, etc. visualize Related to drawing and visualizations.

Comments

@l1mey112
Copy link

Description

A show-set rule on #raw no longer respects text colours. I believe this to be a regression, this wasn't present a month ago and came up when I updated my compiler.

#show raw: set text(fill: white)
#raw("hello")

2023-09-29_15-54

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst
@l1mey112 l1mey112 added the bug Something isn't working label Sep 29, 2023
@mattfbacon
Copy link
Contributor

Bisected to 163c2e1

cc @Dherse

@laurmaedje laurmaedje added visualize Related to drawing and visualizations. text Text layout, shaping, internationalization, etc. labels Sep 29, 2023
@Dherse
Copy link
Sponsor Collaborator

Dherse commented Sep 29, 2023

Bisected to 163c2e1

cc @Dherse

I'll have a look in a few minutes, probably just white being accidentally set to some other color 😬

EDIT: it's just straight up ignoring the color, weird I haven't touched that area of the code

EDIT+: this only occurs on text when you're doing a set text inside of something like raw, otherwise there's no issues. Other containers don't have this issue

EDIT++: it seems that only raw is impacted, I did find a logic bug in color.rs for which I will submit a PR either way, but I can't figure out what is causing the current issue

@Dherse
Copy link
Sponsor Collaborator

Dherse commented Sep 29, 2023

I have determined that the error does not come from raw.rs, when doing text shaping, the fill is already set to black, this tells me that the PDF export code is working as intended, it might be trickier than just looking there, I am also quite surprised that the color PR is causing this

@Dherse
Copy link
Sponsor Collaborator

Dherse commented Sep 29, 2023

Ok, so I found it and it is very insidious, I'll fix it and open a PR

@Dherse
Copy link
Sponsor Collaborator

Dherse commented Sep 29, 2023

Thanks for finding this bug BTW, it should be closed soon enough :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working text Text layout, shaping, internationalization, etc. visualize Related to drawing and visualizations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants