Automattic / Automattic/node-canvas
Some Chinese fonts are downgraded to default fonts after rendering
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
## Steps to Reproduce
```js
registerFont('./xx/HYYakuHei-EEW.ttf', { family: 'HYYakuHei-EEW' });
const canvas = createCanvas(100, 100);
const ctx = canvas.getContext('2d');
ctx.font = '20px HYYakuHei-EEW';
ctx.fillText('测试', 20, 50);
```
output

However, everything is rendered correctly using the canvas API in Chrome browser, so it shouldn't be a font problem.
```html
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
ctx.font = "20px HYYakuHei-EEW";
ctx.fillText("测试", 20, 50);
```
output

font name is from PostScript

## Your Environment
* Version of node-canvas (2.11.2):
* Environment ( node 14.20.0 on Mac OS X 12.4):
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.