Automattic / node-canvas

Node canvas is a Cairo backed Canvas implementation for NodeJS.
9.99k stars 1.15k forks source link

Move away from GTK 2 to newer libraries on Windows #2368

Open UlyssesZh opened 3 months ago

UlyssesZh commented 3 months ago

Issue or Feature

I found a TrueType font that cannot be loaded on Windows. This should be a bug of pango in GTK 2, so I also reported it here on GNOME. However, GNOME team should not be expected to fix bugs on GTK 2, so the real problem is that we should not depend on GTK 2 anymore.

Steps to Reproduce

Load this font and draw some text with it: https://github.com/kaio/wangfonts/raw/master/TrueType/wt071.ttf

(node.exe:2716): Pango-WARNING **: couldn't load font "??????? Not-Rotated 872.7265625px", falling back to "Sans Not-Rotated 872.7265625px", expect ugly output.

Your Environment

UlyssesZh commented 3 months ago

The same font cannot be loaded on Debian bookworm and Ubuntu noble either? It works on Debian bullseye. Bullseye has pango 1.46 while bookworm has pango 1.51.