Automattic/node-canvas

Any emoji support?

Aperta

#760 aperta il 3 mag 2016

 (76 commenti) (24 reazioni) (0 assegnatari)JavaScript (1195 fork)batch import
Help wantedText & FontsUpstream Issue

Metriche repository

Star
 (10.689 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

The following code gives me the follwing image output:

    var Canvas = require('canvas');
    var Image = Canvas.Image;
    var canvas = new Canvas(1200, 600);
    var ctx = canvas.getContext('2d');

    ctx.font = '80px HelveticaNeue';
    ctx.fillText('Start Here emoji 🍔', 50, 100);

    res.setHeader('Content-Type', 'image/png');
    canvas.pngStream().pipe(res);

Not rendering the emoji. Is this possible?

tiltimage

Guida contributor