Skip to content

[Impeller] Uneven letter spacing. #127815

@PiN73

Description

@PiN73

Starting from Flutter 3.10, Impeller is used by default on iOS. Small text seems to have broken kerning

Steps to reproduce

  1. Create new app

  2. Add small text (better noticeable on repeated letters)

Text('IIIIIIIII')
  1. Run the app with Flutter 3.10.2 on iOS

Expected results

The letters should render with even visual spacing (like it was in Skia)

skia

Actual results

The letters renders with uneven visual spacing

skia

In real text it gives the impression of sloppy jumping letters

Details

Full code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Material(
        color: Colors.white,
        child: Center(
          child: Text(
            'IIIIIIIII',
            style: TextStyle(
              color: Colors.black,
            ),
          ),
        ),
      ),
    );
  }
}

To reproduce old Skia behavior on Flutter 3.10

flutter run --no-enable-impeller

To crop and scale screenshot (iPhone 14):

convert screenshot.png -gravity center -crop 120x40+0+0 -scale 800% out.png
Tools versions
Flutter (Channel stable, 3.10.2, on macOS 13.3.1 22E261 darwin-arm64, locale en-RU)
Xcode - develop for iOS and macOS (Xcode 14.3)
Android Studio (version 2022.2)

Flutter 3.10.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9cd3d0d9ff (6 days ago) • 2023-05-23 20:57:28 -0700
Engine • revision 90fa3ae28f
Tools • Dart 3.0.2 • DevTools 2.23.1

All the same on master:

Flutter 3.11.0-14.0.pre.70 • channel master •
https://github.com/flutter/flutter.git
Framework • revision bd11ef06fd (8 hours ago) • 2023-05-29 11:50:25 -0400
Engine • revision f768be1078
Tools • Dart 3.1.0 (build 3.1.0-155.0.dev) • DevTools 2.23.1

May be related: #121887 #124310

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: typographyText rendering, possibly libtxtc: regressionIt was better in the past than it is nowe: 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 versionslimpellerEngine binary size reduction. go/slimpellerteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions