EtheaDev / SVGIconImageList

Three engines to render SVG (Delphi Image32, Skia4Delphi, Direct2D wrapper) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)
Apache License 2.0
327 stars 96 forks source link

TSVGIconImageList doesn't load the icon colours for all icons #269

Closed EricWex closed 3 months ago

EricWex commented 9 months ago

Block Change Swap (1)

The Style tag inside the error prone SVG files has a certain property named stroke-width: 0px. This property is always shared between a number of classes, e.g.: Image

The position of this style is what causes the icons to misbehave. If I shift this style to be the last style in the file's Style tag, the colours render correctly:

Image

Funny enough, the images display fine without any modifications in a browser, and in the File Explorer Preview Pane.

Here are the code <?xml version="1.0" encoding="UTF-8"?>

and this is our fix <?xml version="1.0" encoding="UTF-8"?>

.cls-1, .cls-2, .cls-3, .cls-4 { stroke-width: 0px; }
carloBarazzetta commented 8 months ago

it's a problems inside the Image32 engine... You must open the issue in the https://github.com/AngusJohnson/Image32 repo. When Angus Johnson resolve the problem you can replace your units into Image32\Source units of this project.