flutter_svg
flutter_svg copied to clipboard
Bad parsing on text with tspan
Got following :
But expected that :

<svg width="185" height="43" viewBox="0 0 185 43" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<text x="35.081" y="15" font-family="OpenSans-Italic, Open Sans" font-size="14" font-style="italic" fill="#333">
π( D² - d² )( N - N
<tspan y="15" font-size="10">u</tspan>
)
</text>
</g>
</svg>
SVG standard : https://developer.mozilla.org/fr/docs/Web/SVG/Element/tspan
Temporary fix on my side.... : (ugly)
<svg width="185" height="43" viewBox="0 0 185 43" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<text x="35.081" y="15" font-family="OpenSans-Italic, Open Sans" font-size="14" font-style="italic" fill="#333">
π( D² - d² )( N - N
<tspan y="15" font-size="10">u
<tspan y="15" font-size="14">)</tspan>
</tspan>
</text>
</g>
</svg>
I started cleaning up text a few days ago and think I can address this now.