Skip to content

[Impeller] draw emojis without alpha #119672

@zjywill

Description

@zjywill

Draw text with emojis with alpha color, emojis show with a solid color.

  void drawText(Canvas canvas, String name, double x, double y,
      double angleRotationInRadians) {
    canvas.save();
    canvas.translate(x, y);
    canvas.rotate(angleRotationInRadians);
    TextSpan span =
        new TextSpan(style: new TextStyle(color: Color(0x0b000000)), text: name);
    TextPainter tp = new TextPainter(
        text: span,
        textAlign: TextAlign.left,
        textDirection: TextDirection.ltr);
    tp.layout();
    tp.paint(canvas, new Offset(0.0, 0.0));
    canvas.restore();
  }

[✓] Flutter (Channel stable, 3.7.0, on macOS 13.1 22C65 darwin-x64, locale en-CN)

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: typographyText rendering, possibly libtxte: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.7Found to occur in 3.7found in release: 3.8Found to occur in 3.8has 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

Relationships

None yet

Development

No branches or pull requests

Issue actions