-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Issue or Feature
The node-canvas crashes the node.js process after a few seconds when (possibly) a custom font doesnt load.
Error:
(node.exe:4992): Pango-WARNING **: couldn't load font "Custom Not-Rotated 1
0px", falling back to "Sans Not-Rotated 10px", expect ugly output.
(node.exe:4992): Pango-CRITICAL **: pango_win32_font_map_get_font_cache: asserti
on `font_map != NULL' failed
**
Pango:ERROR:pangowin32.c:831:pango_win32_font_finalize: assertion failed: (win32
font->fontmap != NULL)
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Steps to Reproduce
const { createCanvas, loadImage, Image, registerFont } = require('canvas');
const canvas = createCanvas(200, 200);
const ctx = canvas.getContext('2d');
registerFont('./assets/fonts/Custom.ttf', {family: 'custom_font_name'});
ctx.font = 'normal 10px custom_font_name'
ctx.fillText("Text", 250, 200)Your Environment
- Version of node-canvas (e.g. 1.4.0): 2.0.0-alpha.11
- Environment (e.g. node 4.2.0 on Mac OS X 10.8): node v8.10.0 on win7