Skip to content

vector_graphics_compiler-v1.3.2

@mackings mackings tagged this 15 Oct 20:11
A `tspan` without its own `x`/`y` inside a translated `g` was drawn with the translation applied twice.

The parent `text` has `x`/`y`, so the compiler applies the transform to its position. The `tspan` has no position, so it kept the transform as well. The renderer then applied that transform on top of a position that already had it.

Now a `tspan` without its own position follows its parent: if the parent already applied the transform, the `tspan` does not apply it again. The bug is in `vector_graphics_compiler`, which `flutter_svg` uses to parse SVGs.

Fixes https://github.com/flutter/flutter/issues/189925

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Assets 2
Loading