Skip to content

[canvaskit] font renders missing glyph when text overflow is ellipsis #76473

@peerwaya

Description

@peerwaya

Steps to Reproduce

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

final Color darkBlue = Color.fromARGB(255, 18, 32, 47);

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark().copyWith(
        scaffoldBackgroundColor: darkBlue,
        textTheme: GoogleFonts.openSansTextTheme(
          ThemeData.dark().textTheme,
        ),
      ),
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: MyWidget(),
        ),
      ),
    );
  }
}

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
        child: Container(
            width: 100,
            child: Text('Hello, World!',
                style: Theme.of(context).textTheme.headline4,
                maxLines: 1,
                overflow: TextOverflow.ellipsis)));
  }
}

Expected results:
Without Canvaskit
Screen Shot 2021-02-21 at 7 14 06 AM

Actual results:
Result using open sans google font
Screen Shot 2021-02-21 at 7 17 00 AM

Result using custom font Gilroy
Screen Shot 2021-02-21 at 7 19 18 AM

flutter doctor -v
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.27.0-5.0.pre.86, on Mac OS X 10.15.7 19H105 darwin-x64,
    locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.53.1)
[✓] Connected device (3 available)

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: typographyText rendering, possibly libtxtc: regressionIt was better in the past than it is nowdependency: skiaSkia team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 2.10Found to occur in 2.10found in release: 2.11Found to occur in 2.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallywaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions