Skip to content

[BUG] Emoji rendering breaks subsequent canvas drawing on ARM Linux (no error) #2567

Closed

Description

@948764321

Environment:

  • node-canvas version: 3.1.0
  • Node.js version: 20.9.0
  • Platform: ARM Linux
  • Font: Segoe UI Emoji

Describe the bug:
When attempting to render an emoji character (⚠️) using the "Segoe UI Emoji" font on ARM Linux, the emoji fails to render correctly, and all subsequent drawing operations are lost — the canvas effectively becomes blank after calling fillText() for that emoji. No error is thrown, and the process continues without any crash or warning.

Steps to reproduce:

const { createCanvas } = require('canvas');

const canvas = createCanvas(400, 200);
const ctx = canvas.getContext('2d');

// This works fine
ctx.fillStyle = 'red';
ctx.fillRect(0, 0, 400, 200);
ctx.fillStyle = 'white';
ctx.font = '48px "Segoe UI Emoji"';
ctx.fillText('Hello', 50, 50);  // Renders correctly

// This emoji breaks everything
ctx.fillText('⚠️', 50, 100);    // Emoji not rendered, subsequent drawing lost

// The following drawing never appears
ctx.fillStyle = 'blue';
ctx.fillText('After emoji', 50, 150);  // NOT RENDERED

console.log('No error, no crash, but canvas is effectively corrupted after the emoji');

Activity

  1. 948764321 commented on Apr 24, 2026

    @948764321
    Author

    The same happens with ✔️

  2. chearon commented on May 15, 2026

    @chearon
    Collaborator

    What happens if you set ctx.textDrawingMode = 'glyph', does it work then?

  3. 948764321 commented on May 26, 2026

    @948764321
    Author

    What happens if you set ctx.textDrawingMode = 'glyph', does it work then?

    The production environment has this, but there are still problems.

  4. chearon commented on Aug 16, 2026

    @chearon
    Collaborator

    Fixed by #2602 (npm install canvas@next)

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions