Skip to content

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

Closed

Description

@l1mey112

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

Activity

  1. added
    bug
    on Sep 29, 2023
  2. mattfbacon commented on Sep 29, 2023

    @mattfbacon
    Contributor

    Bisected to 163c2e1

    cc @Dherse

  3. added
    visualize
    text
    on Sep 29, 2023
  4. Dherse commented on Sep 29, 2023

    @Dherse
    Contributor

    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

  5. Dherse commented on Sep 29, 2023

    @Dherse
    Contributor

    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

  6. Dherse commented on Sep 29, 2023

    @Dherse
    Contributor

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

  7. Dherse commented on Sep 29, 2023

    @Dherse
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtextvisualize

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions