unwanted changes of svg code during conversion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
There are noticed odd changes in inline svg code during conversion. Especially during conversion epub>epub (because in that case svg input and output codes can be compared), but the same impacts can be seen in rendered raster images in case of conversion to other formats.
example of input inline svg:
<svg xmlns="http://
viewBox="0 0 15849.6 21132.8"
xmlns:xlink="http://
>
<defs>
<style type="text/css">
<![CDATA[
.fil0 {fill:#2B2A29}
.fnt1 {font-weight:
.fnt0 {font-weight:
]]>
</style>
</defs>
<g id="Vrstva_
<text x="5218.93" y="6709.26" class="fil0 fnt0">KAREL ČAPEK</text>
<text x="5265.25" y="7298.9" class="fil0 fnt1">VÁLKA S MLOKY</text>
</g>
</svg>
corresponding output:
<svg xmlns="http://
<defs>
<style type="text/css" class="calibre3">
.fil0 {fill:#2B2A29}
.fnt1 {font-weight:
.fnt0 {font-weight:
</style>
</defs>
<g id="Vrstva_
<text x="5218.93" y="6709.26">KAREL ČAPEK</text>
<text x="5265.25" y="7298.9">VÁLKA S MLOKY</text>
</g>
</svg>
Especially removing style references is quite destructive for this particular example. Since I'm not very familiar with svg, I can't decide if the changes could be intentional for some reason... But all in all, they all appear to be a bug.
Calibre 7.7 (but conversion behaviour seems to be years old)
Windows 10
Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.