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
{{ message }}
Repository navigation
Pango-CRITICAL errors when using Canvas on Windows #2492
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');
Activity
fuchsundvogel commentedon Mar 24, 2025
Bump. Same problem here.
chearon commentedon Aug 16, 2026
Fixed by #2602