Automattic / Automattic/node-canvas
Text style not applied
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
## Issue or Feature
I want to use SanFrancisco. I need Black and regular styles, but for some reason the style is not applied :(
## Steps to Reproduce
```js
registerFont(__dirname + "/fonts/regular.ttf", {family: "SF"});
registerFont(__dirname + "/fonts/black.ttf", {family: "SF", weight: "bold"});
const canvas = createCanvas(512, 512);
const ctx = canvas.getContext('2d');
ctx.fillStyle = '#ffffff';
ctx.fillRect(0, 0, 512, 512);
ctx.fillStyle = '#000000';
ctx.font = '125px SF';
ctx.fillText("First text", 0, 100);
ctx.font = 'bold 85px SF';
ctx.fillText("Second text", 0, 175);
```
## Your Environment
* Version of node-canvas - 2.6.1
* Environment node 12.18.4 on Windows 10

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.