Author: FT2.wiki
Description:
SVG images containing text elements whose sizes are given in "%" or "em" (and possibly other non-px units?), do not correctly convert sizes such as "120%" or "2em" to their px equivalents, causing serious rendering errors.
Example #1:
<text style="font-size:14px;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial">
<tspan x="13" y="25" font-weight = "bold" font-size = "120%">HEADER</tspan>
</text>
fails, and renders the font as 120px (!). If the "120%" is replaced by its exact px equivalent "16.8px" (=14px x 120%) it succeeds. The effect of this bug is the font renders at a huge size, causing large (often black) rectangles and "letterboxes" to hide part or all of the image, or indeed not being visible at all.
Example #2:
<text style="font-size:14px;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial">
<tspan x="13" y="25">HEADER</tspan> <tspan x="13" dy="2em">My paragraph text</tspan>
</text>
fails (puts 2nd line on same y-co-ordinate as first line rather than 2 lines below it). If the "2em" is replaced by its exact px equivalent "28px" (=14px x 2) it succeeds.
(May also affect rendering of other elements that can have sizes given in "%" or "em" terms too.)
Version: unspecified
Severity: normal