Automattic / Automattic/node-canvas
Unable to Use Custom Fonts Windows 10
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
## Issue or Feature
I have exhausted every guide on the web. I am currently unable to use any custom font on Windows 10.
Error message: Pango-WARNING **: 12:15:05.151: couldn't load font "Roboto Light Not-Rotated 25px", falling back to "Sans Light Not-Rotated 25px", expect ugly output.
## Steps to Reproduce
```js
var Canvas = require('canvas');
var canvas = Canvas.createCanvas(200, 200);
var ctx = canvas.getContext('2d');
Canvas.registerFont('src/fonts/Roboto-Light.ttf', { family: 'Roboto-Light' });
ctx.font = '25px Roboto-Light';
ctx.fillText('ABC', 0, 0);
// etc.
```
## Your Environment
* Version of node-canvas (output of `npm list canvas` or `yarn list canvas`):
* Environment (e.g. node 4.2.0 on Mac OS X 10.8):
Node v14.4.0 on Windows 10 x64
Canvas v2.6.1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.