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

paint-order on svg doesn't work #138

Closed
tyutjohn opened this issue Jul 15, 2022 · 6 comments
Closed

paint-order on svg doesn't work #138

tyutjohn opened this issue Jul 15, 2022 · 6 comments

Comments

@tyutjohn
Copy link

I want to set margin for font, like the textStroke property of css, but it doesn't work when I use paint-order:stroke。This is an example on MDN
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"> <linearGradient id="g" x1="0" y1="0" x2="0" y2="1"> <stop stop-color="#888"/> <stop stop-color="#ccc" offset="1"/> </linearGradient> <rect width="400" height="200" fill="url(#g)"/> <g fill="crimson" stroke="white" stroke-width="6" stroke-linejoin="round" text-anchor="middle" font-family="sans-serif" font-size="50px" font-weight="bold"> <text x="200" y="75">stroke over</text> <text x="200" y="150" paint-order="stroke" id="stroke-under">stroke under</text> </g> </svg>
I got two fonts with fill first and stroke after
So how can I set this in resvg ? This looks strange

@yisibl
Copy link
Member

yisibl commented Jul 15, 2022

Dependent on upstream support: linebender/resvg#422

@tyutjohn
Copy link
Author

Thanks Reply~
I will provide a PR to support it

@tyutjohn
Copy link
Author

Thanks Reply~ I will provide a PR to support it

Status record. paint-order

@yisibl
Copy link
Member

yisibl commented Aug 17, 2022

@tyutjohn Do you still have plans to continue to complete the upstream PR?

@tyutjohn
Copy link
Author

Of course, Maybe next week I'll have some spare time to work on it

@yisibl
Copy link
Member

yisibl commented Nov 17, 2022

Done in #156

@yisibl yisibl closed this as completed Nov 17, 2022
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

2 participants