Closed rtrick closed 8 months ago
One of my teammates let me know that this is probably also important info for the report: We use a skia-enabled build of msdfgen, and we use skia for SVG parsing, not the default SVG parser.
MSDF only takes care of sharp corners. Your SVG has rounded corners.
Ah! I see. So even if at the rasterized resolution the edge looks "sharp" it needs to be a literal sharp corner to trigger the MSDF behavior.
This makes sense, as in our data, it seemed that the SVGs made in vector tools seemed to work reliably, but traced raster images more often had the issue.
Thanks so much for the clarity! We now know how to clean our data set. I think it would be reasonable to close this issue, though it would certainly be cool if there were some feature that could handle this automatically.
Thank you!
First off, thank you for all the amazing work on this tool, it unlocks so much amazing art potential!
We believe we've found an unexpected behavior when processing some SVGs. Some of the SVGs we try to send through msdfgen appear to generate monochrome SDFs rather than MSDFs.
We believe we've isolated this to when an SVG has curve path commands. If the image only uses lines and arcs, we get an MSDF that renders as expected.
This is the unexpected result, generated from an SVG with curve commands SVG: Output SDF: Example render of the inner corner:
This is a the expected result generated from an SVG with only line and arc commands SVG: Output MSDF: Example render of the inner corner: