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

Text stroke not working #2720

Open
habiiev opened this issue Apr 17, 2024 · 0 comments
Open

Text stroke not working #2720

habiiev opened this issue Apr 17, 2024 · 0 comments

Comments

@habiiev
Copy link

habiiev commented Apr 17, 2024

Describe the bug

stroke and strokeWidth properties are not working on Text element.

I tried this out in different browsers (chromium based, safari and firefox) and it does not work in any of them.

I found some code in examples that does stroke on text, and it does not work there either:

stroke="#FFFFFF"
strokeWidth="2"
strokeLinejoin="round"

So considering there is code in the examples that uses this feature – I think this is supposed to work and not a new feature request, but correct me if I am wrong, of course.

To Reproduce

Code:

<Document>
    <Page>
        <Svg width="500" height="500">
            <Text x="50" y="50" stroke="red" fill="black" strokeWidth="1">test</Text>
        </Svg>
    </Page>
</Document>

REPL: https://react-pdf.org/repl?code=3187b0760ce02e0040ca03703980540a6d18178600a0253601f1e0140c3003c00888c00ae02d9a614479155002808649aed3a74a8890c00ee012c009940016580110056000cab14c3969252395095a8d82870f4003d639c31a6004f1b9ba00271001acd12e769a668066920036814a0046813cc06e4e50ae1e00ea32f24a008c8a445018509400f4166c1c42b9a22614b9bcfc26b9b40cccacecf800dca42d004a6891505cd400620074de60d268ceb822c8e89839444da44000

Expected behavior
Stroke being rendered in the document

Screenshots
This is what the code in the repl looks like right now:

Screenshot 2024-04-17 at 13 36 32

This is what it should look like:

Screenshot 2024-04-17 at 13 37 28

Desktop:

  • OS: MacOS
  • Browser: chrome, safari and firefox
  • React-pdf version: v3.4.2
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

No branches or pull requests

1 participant