Open qxorio opened 2 years ago
Happening same for me.
It worked fine on node 14 with canvas 2.6.1 and anything above, all woff
files are showing box with unicode. However ttf
file works fine.
What are the changes between 2.6.1 vs +?
And also, node 16 and node 18 also breaks on 2.6.1.
Seems like either upgrading node OR canvas package breaks the font.
Very much related to https://github.com/Automattic/node-canvas/issues/1737.
Long story short, woff
support has been broken on any version above 2.6.1+
Currently Node 14 with Canvas 2.6.1 works with woff
Issue
I have node-canvas installed on an eleventy website that is being used to generate OpenGraph images and stored in an image CDN. I'm running MacOS locally with npm 8.1.2, node 16.13.1, and canvas 2.8.0. I am using some
.woff
fonts available in my project to help generate the OG images. When building the project locally, everything works fine and I see my expected image uploaded to my image CDN.When deploying to Netlify (running same node and npm versions) I get an image uploaded to my image CDN but it shows box characters with corresponding character unicode values inside. No exceptions, warnings, or errors in the build log of Netlift. I'm a bit confused where to even begin looking, so help is appreciated!
You can see the file using canvas in the repository here. I will include the entirety of the file below.
Steps to Reproduce
You can attempt to clone the repository, but it expects some environment variables for Notion and Cloudinary. The real issue is uploading to Netlify.
Netlify build log:
Your Environment
npm list canvas
oryarn list canvas
): 2.8.0