SVG gradients don't render
I noticed when trying to add the following file into my document, that the gradient on the letter j does not render and the letter is not displayed. I do not know if this is a bug or unimplemented feature, but the support for gradients already is in weasyprint for normal html. If anyone knows what I need to achieve without svg gradients, tell me (a workaround).
Hi!
The problem is that we don’t support (yet) the href attribute of gradients.
As a workaround, you can replace
<linearGradient
inkscape:collect="always"
id="linearGradient885">
<stop
style="stop-color:#b388c5;stop-opacity:1;"
offset="0"
id="stop881" />
<stop
style="stop-color:#030422;stop-opacity:1;"
offset="1"
id="stop883" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient885"
id="linearGradient887"
x1="81.66954"
y1="71.572083"
x2="84.236176"
y2="51.393879"
gradientUnits="userSpaceOnUse" />
by
<linearGradient
inkscape:collect="always"
id="linearGradient887"
x1="81.66954"
y1="71.572083"
x2="84.236176"
y2="51.393879"
gradientUnits="userSpaceOnUse">
<stop
style="stop-color:#b388c5;stop-opacity:1;"
offset="0"
id="stop881" />
<stop
style="stop-color:#030422;stop-opacity:1;"
offset="1"
id="stop883" />
</linearGradient>
I’ve seen (too?) many SVG documents in my life, I’ve spent weeks reading the documentation, and it’s the first time I meet this feature. This format is full of beautiful features that we should consider as presents given to the people spending their sleepless nights implementing renderers, what an incredible time to be alive…
thanks!