Automattic / Automattic/node-canvas
registerFont() not parsing the font.
Open
Text & Fonts
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
## Issue
## Steps to Reproduce
I want to use the Roboto font, but if i try to register the font via `registerFont()` , the code ends with error. `Could not parse font file`
```js
const { createCanvas, registerFont } = require("canvas");
registerFont("./cdn/roboto.ttf", {
family: "Roboto",
});
const canvas = createCanvas(500, 500);
const ctx = canvas.getContext("2d");
```
## Environment
* Version of node-canvas : `2.8.0`
* Environment : `node 16.4.0`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.