Skip to content

vector_graphics-v1.2.6

@francisrath francisrath tagged this 02 Nov 18:03
`FlutterVectorGraphicsListener.onDrawText` lays out every paragraph at infinite width, using the ambient text direction. Under RTL the default `TextAlign.start` resolves to right, which puts each line at x = +∞, so no `<text>` is drawn at all. Shapes are unaffected. The listener already positions text itself (`x`, `dx`, and `text-anchor` through `maxIntrinsicWidth`), so this change sets `textAlign: TextAlign.left` on the paragraph. The text direction is still passed through, so bidi handling is unchanged.

The new test renders `<text x="10">` under both directions and checks that ink is painted and starts at x ≈ 10. Without the fix, `rtl` paints no pixels.

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

## Pre-Review Checklist

[^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.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Assets 2
Loading