coil icon indicating copy to clipboard operation
coil copied to clipboard

Create a public SVG parser interface to enable custom SVG parsing/rendering implementations.

Open colinrtwhite opened this issue 5 months ago • 1 comments

A common issue we get is that an SVG doesn't render correctly on Android or other platforms (e.g. one, two, three, four). Especially on Android, the SVG parser we use hasn't had a new release in a long time and has many rendering fixes on master that haven't been released yet.

Currently we don't have a great solution to these problems in Coil as there's no way for users to use a custom SVG parser if default ones don't work. This PR supports passing in a custom Svg.Parser to SvgDecoder so users will now be able to hook up their own parser instead of having to run a fully custom Decoder, which is more work.

colinrtwhite avatar Jun 13 '25 18:06 colinrtwhite

Requested Copilot as well as I want to kick the tires on it 😅

colinrtwhite avatar Jun 13 '25 18:06 colinrtwhite

do non-android platform scale with density?? I say it because i dont think so and devs can modify density (for desktop especially). it would be good to be able to pass a value of density scaling (maybe it is not needed but im not 100% sure)

PMARZV avatar Jun 29 '25 18:06 PMARZV

@PMARZV Could you open a separate enhancement request for that please?

colinrtwhite avatar Jun 29 '25 18:06 colinrtwhite