Skip to content

[Web HTML]The end of the text line is clipped #96912

@boyan01

Description

@boyan01

Steps to Reproduce

  1. Execute flutter run on the code sample
  2. Open website on mobile browser.

Expected results:

image

Actual results:

image

The problem can be reproduced on Android Chrome. or reproduced on macOS safari if we set --web-renderer html.

Code sample
import 'dart:ui';

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Material(child: Center(child: _TextWidget())),
    );
  }
}

class _TextWidget extends StatelessWidget {
  const _TextWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const SizedBox(
      width: 60,
      child: Text(
        '0x123ABCaaacFGAcdef1241faFAFcdsAFAF12fsaio90',
        style: TextStyle(fontSize: 20),
      ),
    );
  }
}
Logs
Flutter 2.9.0-1.0.pre.398 • channel master •
https://github.com/flutter/flutter.git
Framework • revision 8017883a5d (32 hours ago) • 2022-01-18 23:04:01 -0500
Engine • revision 7a33b4b3fb
Tools • Dart 2.17.0 (build 2.17.0-27.0.dev) • DevTools 2.9.2

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: typographyText rendering, possibly libtxte: web_htmlHTML rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 2.8Found to occur in 2.8found in release: 2.9Found to occur in 2.9has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions