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

Stroke-to-fill conversion #564

Open
nical opened this issue Apr 18, 2020 · 5 comments
Open

Stroke-to-fill conversion #564

nical opened this issue Apr 18, 2020 · 5 comments
Labels

Comments

@nical
Copy link
Owner

nical commented Apr 18, 2020

For correct strokes, it would be useful to have a way to convert a stroke into a filled outline.

@yisibl
Copy link

yisibl commented Sep 14, 2021

This is particularly useful for generating fonts or icon fonts through SVG, the Rust community needs a library like picosvg.

As far as I know, only pathfinder supports the OutlineStrokeToFill function, but it is not perfect. Hope that the priority of this feature can be increased.

pathfinder:
image

@nical
Copy link
Owner Author

nical commented Sep 14, 2021

It's not as much a priority than an available spare time issue. If you would like to contribute an implementation I'd be happy to take it. For what it's worth, I suspect that pathfinder's glitches are due to how the filled shape is rendered rather than what outline it generates from the stroke, but I'm not 100% sure.

@yisibl
Copy link

yisibl commented Sep 15, 2021

Thank you for your reply.

@torokati44
Copy link

FWIW this would make the colored overlays on https://z0r.de/2245 uniform, as they should be.

@jrmuizel
Copy link
Collaborator

jrmuizel commented Feb 3, 2023

FWIW, https://crates.io/crates/tiny-skia-path has a good implementation of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants