Skip to content

Text shadows now appear broken on iOS #150114

@mark8044

Description

@mark8044

Steps to reproduce

@gaaclarke
@flar
@jonahwilliams

Hi I noticed you were all recently working on blurs. I just upgraded flutter master channel to fdb74fd3e7 and noticed text shadows are very different on iOS and thinking it might be related to blurs, or at the least this triggers a thought on what change happened.

With this current change, text shadows look very different between iOS and Android, and downright strange on iOS.

I can't unfortunately show a comparison snapshot since Im seeing it on the two physical devices side by side. Even looking at the shadow by itself on iOS it can look downright crazy (like tiger stripes) with some of my text shadows (previously very elegant shadows).

I did include a simple widget which if you run on iOS and Android and put the two devices next to each other the difference will be quite obvious

PS, for whatever reason the problem seem even more magnified when using different fonts. In my case, if you use Inter font its gets really crazy. I left it commented out in the same code incase you have that font and want to try it

Expected results

Text shadows should look similar between iOS and Android and ideally the way they used to be

Actual results

Different text shadows appearance on IOS from Android

Code sample

Code sample
class TestViewShadows extends ConsumerWidget {
  const TestViewShadows(
      { super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {


    return Card(
      elevation: 0,
      color: Colors.transparent,
      margin: EdgeInsets.zero,
      child: Stack(
        alignment: Alignment.center,
        children: [
          Container(color: Colors.white,width: double.infinity,height: double.infinity,),
            //Image.network('https://picsum.photos/800/300'),
          Align(alignment: Alignment.centerLeft,
              child: Padding(
                padding: const EdgeInsets.fromLTRB(4.0, 0, 0, 0),
                child:
                Container(
                  padding: const EdgeInsets.fromLTRB(14, 8, 14, 8),
                  child:
                    const Text('Crazy shadows',
                      style:
                      TextStyle(
                          ///fontFamily: "Inter", <--- Try uncommenting this to see it get even worse
                          fontWeight: FontWeight.w700,
                          fontSize: 34,
                          color: Colors.white,
                          letterSpacing: -1,
                              shadows: <Shadow>[
                                Shadow(
                                  offset: Offset(1.0, 1.0),
                                  blurRadius: 23.0,
                                  color: Color.fromARGB(255, 0, 0, 0),
                                ),
                                Shadow(
                                  offset: Offset(1.0, 1.0),
                                  blurRadius: 2.0,
                                  color: Color.fromRGBO(0, 0, 0, 0),
                                ),
                              ],

                      ),)

                ),
              )
          )
        ],
      ),
    );
  }

}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Flutter 3.23.0-13.0.pre.197 • channel master • https://github.com/flutter/flutter.git
Framework • revision fdb74fd3e7 (6 hours ago) • 2024-06-12 10:47:07 +0200
Engine • revision c7fcbfce60
Tools • Dart 3.5.0 (build 3.5.0-250.0.dev) • DevTools 2.36.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requestsr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions