You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using node-canvas on Windows, I consistently encounter Pango-CRITICAL errors referencing pango_font_description_get_family: assertion 'desc != NULL' failed. These errors appear immediately upon calling canvas.getContext('2d'), even in minimal code examples that don't explicitly work with text or fonts. While my code continues to function despite these errors, they flood the console output.
Using system fonts and custom fonts (I have no use for fonts whatsoever but thought it might help make the error disappear)
Nothing worked so far.
Reproduction Steps
This minimal example reproduces the issue:
import{Image,createCanvas}from'canvas';import*asfsfrom'fs';constimagePath='./src/images/test.jpg';constimage=newImage();image.src=fs.readFileSync(imagePath);constcanvas=createCanvas(image.width,image.height);// The following line triggers Pango-CRITICAL errors:constctx=canvas.getContext('2d');
When using
node-canvas
on Windows, I consistently encounter Pango-CRITICAL errors referencingpango_font_description_get_family: assertion 'desc != NULL' failed
. These errors appear immediately upon callingcanvas.getContext('2d')
, even in minimal code examples that don't explicitly work with text or fonts. While my code continues to function despite these errors, they flood the console output.I've tried :
Nothing worked so far.
Reproduction Steps
This minimal example reproduces the issue:
Error Output
Environment
The text was updated successfully, but these errors were encountered: