Automattic / Automattic/node-canvas
Cannot Load Font
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
## Issue or Feature
I've been trying to register a font but whenever I use it I get
> Pango-WARNING **: couldn't load font "Avenir Not-Rotated 48px", falling back to "Sans Not-Rotated 48px", expect ugly output.
## Steps to Reproduce
```js
var Canvas = require('canvas');
Canvas.registerFont(path.join(__dirname, "fonts", "Avenir.ttf"), { family: "AvenirBook"});
var canvas = Canvas.createCanvas(200, 200);
var ctx = canvas.getContext('2d');
ctx.font = '48px "AvenirBook"';
ctx.fillText('hello', 50, 50);
// etc.
```
Avenir font: http://summerfieldmattress.com/skin/frontend/default/craigs/fonts/avenir%20fonts/avenir.ttf
## Your Environment
* Version of node-canvas (e.g. 1.4.0): Latest Release
* Environment (e.g. node 4.2.0 on Mac OS X 10.8): node v8.11.3 on Windows 10 64bit
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.