BigBadaboom / androidsvg

SVG rendering library for Android
http://bigbadaboom.github.io/androidsvg/
Apache License 2.0
1.21k stars 231 forks source link

Text is hidden after scaled a element #283

Open deckerst opened 6 months ago

deckerst commented 6 months ago

Describe the bug In a specific complex SVG all the text was hidden, and I trimmed it down to a minimum sample showing the issue. It does not seem to be related to any advanced or rare feature. Just a sequence of tags that somehow hide the text.

To Reproduce Render the samples below with AndroidSVG.

Expected behavior The text should be visible, as rendered by typical SVG viewers.

Stack traces I don't see any reported errors.

SVG file

  1. Here's a sample where the text is mistakenly hidden when rendered with AndroidSVG #1011_text_after_a_scaled_30_nok

    <g transform="scale(30,30)"><a /></g>
    <text x="100" y="100">Sample Text</text>
  2. And the same sample slightly tweaked, where the text is visible (as it should) when rendered with AndroidSVG #1011_text_after_a_scaled_01_ok

    <g transform="scale(1,1)"><a /></g>
    <text x="100" y="100">Sample Text</text>

Device It was reported to me from an unknown device, and I can reproduce the issue on a Samsung S10e with Android 12.