Skip to content

[Impeller] Text rendering pixelated when scaled #126510

@MousyBusiness

Description

@MousyBusiness

Is there an existing issue for this?

Steps to reproduce

  1. Run test code and zoom in and out the Interactive viewer
  2. You'll notice Impeller pixelates the text which doesn't happen in Skia
  3. This is on iPad, and iPad sim, have no tested on other platforms

Expected results

Text scaling to be at least as good as Skia.

NOTE: I tested with both 3.10 and 3.7.12 with impeller enabled, happens in both versions

Actual results

Impeller text rendering is significantly worse when scaled

Code sample

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

const double maxWindowHeight = 5064;
const double maxWindowWidth = 2000;

class _MyHomePageState extends State<MyHomePage> {

// TODO make long text much longer, I hit the character limit trying to submit this bug
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: InteractiveViewer(
        constrained: true,
        child: Center(
          child: FittedBox(
            child: SizedBox(
              width: maxWindowWidth,
              height: maxWindowHeight,
              child: Text(
                longText,
                style: TextStyle(fontSize: 16),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

final longText =
    """Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Egestas dui id ornare arcu. Ultricies leo integer malesuada nunc. Volutpat diam ut venenatis tellus in metus vulputate eu scelerisque. Morbi quis commodo odio aenean sed adipiscing diam. Pretium fusce id velit ut tortor pretium viverra suspendisse. Scelerisque fermentum dui faucibus in. Iaculis urna id volutpat lacus laoreet non. Porttitor lacus luctus accumsan tortor posuere ac ut. Sagittis id consectetur purus ut faucibus. Eu consequat ac felis donec et odio pellentesque.
""";

Screenshots or Video

IMG_BA04D95F1AB3-1
IMG_EF6CECBB3FEC-1

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.0, on macOS 13.2.1 22D68 darwin-arm64, locale en-NZ)
! Doctor found issues in 2 categories.
❯ flutter doctor -v
[✓] Flutter (Channel stable, 3.10.0, on macOS 13.2.1 22D68 darwin-arm64, locale en-NZ)
• Flutter version 3.10.0 on channel stable at /Users//Flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 84a1e90 (2 days ago), 2023-05-09 07:41:44 -0700
• Engine revision d44b5a94c9
• Dart version 3.0.0
• DevTools version 2.23.1

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.11.3

Metadata

Metadata

Assignees

Labels

a: typographyText rendering, possibly libtxte: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions