Automattic / Automattic/node-canvas
Text shows as tofu on Centos 8 with a custom font
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
I am trying to write on an image with a custom font, in this case GNU Unifont. I have followed the installation guide provided for CentOS. The same exact code writes correctly the emoji in the image on my Windows environment while on CentOS it shows as tofu (a square with numbers). I do not get any warnings or errors in my logs.
#Issue or Feature
Issue.
## Steps to Reproduce
```js
var { createCanvas, Image, registerFont } = require('canvas');
registerFont('./assets/font/unicode.ttf', { family: 'GNU Unifont' });
var canvas = createCanvas(200, 200);
var construct = canvas.getContext('2d', { alpha:true });
var img = new Image();
img.src = './assets/some_image.png';
construct.drawImage(img, 0, 0);
construct.font = 'normal 20px "Open Sans", "GNU Unifont"';
construct.stroke(null);
construct.fillText(`🎃`, 100, 100);
```
## Your Environment
* Version of node-canvas (output of `npm list canvas` or `yarn list canvas`): canvas@2.6.1
* Environment (e.g. node 4.2.0 on Mac OS X 10.8): CentOS 8, node v12.16.3
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.