Why can't ImageMagick read any fonts on my machine?
I'm trying to run montage.
montage `ls ?.png` `ls ??.png` -tile 6x3 -geometry 32x32 tile.jpgBut I am getting this error regarding fonts.
montage: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1239.Why can't it read any fonts?
Someone suggested I run montage -list font but it doesn't return anything. I'm running OS X 10.11, and ImageMagick 6.9.3-0.
1 Answer
To answer my direct question, ImageMagick requires a type.xml document containing a list of all the fonts on the machine. While it seems like this list should be auto-generated, it is not.
As @AaronLayfield mentioned above, there is a manual way to generate the font list as explained here. Below is my version of the workaround:
Save this perl script as
imagick_type_gen.plOpen Terminal and
cdinto the directory you saved the file to, then change the permissions on the file withchmod 755 imagick_type_gen.pl.Create the
.magickfolder in your home directory withmkdir ~/.magick.Run the script and export the output with
./imagick_type_gen.pl > ~/.magick/type.xml.
Now it should work.