Fontconfig error: Cannot load default config file Node.js Canvas
I cant use the fillText method in a canvas image (its for a discord bot) the letters are replaced by squares
Hello! You are in luck! Here is the solution:
First, install a font. I usually use Google Fonts
Second, install as a zip. Unzip it and drag in the font(s) of your choice.
Third, add this line of code at the top of the file:
Now, you can use the font like:
Hope this helps! Be sure to mark as correct answer!
This is also my problem, I used heroku before, and just by making a directory named '.fonts' and putting my downloaded fonts there, everything works perfectly. I don't even use registerfonts.