Skip to content

[Impeller] Oversized stroked text is clipped since 3.24.0. #153784

@ciriousjoker

Description

@ciriousjoker

Steps to reproduce

Run this sample code on ios with Flutter 3.24.0:
https://dartpad.dev/?id=5d00a4fae2ef29d15c3b9c6ea753658e

The breakpoint seems to be fontSize 86, ie 85 works, 86 and above breaks.

Expected results

  1. text should look like a blob
  2. after clicking the button, the text should become a bigger blob

The code runs perfectly fine on web as well as Flutter 3.22.3 and most likely many previous versions, this is how it's supposed to look.

Actual results

  1. text looks like a blob
  2. after clicking the button, the text is clipped

Code sample

Code sample (copied straight from the dartpad, just added here for search indexing)
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _isBig = false;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              Text(
                "1234",
                style: TextStyle(
                  fontSize: _isBig ? 100 : 80,
                  overflow: TextOverflow.visible,
                  foreground: Paint()
                    ..style = PaintingStyle.stroke
                    ..strokeCap = StrokeCap.round
                    ..strokeJoin = StrokeJoin.round
                    ..strokeWidth = 300
                    ..color = Colors.blue,
                ),
              ),
              ElevatedButton(
                onPressed: () {
                  setState(() => _isBig = !_isBig);
                },
                child: Text("toggle"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots on ios

CleanShot 2024-08-20 at 21 15 21@2x

CleanShot 2024-08-20 at 21 15 07@2x

Logs

There are no logs

Flutter Doctor output

Doctor output
working:
[✓] Flutter (Channel stable, 3.22.3, on macOS 14.6.1 23G93 darwin-arm64, locale de-DE)

broken:
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale de-DE)

rest is identical:
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.92.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions