Celeb Glow
news | February 26, 2026

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.jpg

But 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.

3

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:

  1. Save this perl script as imagick_type_gen.pl

  2. Open Terminal and cd into the directory you saved the file to, then change the permissions on the file with chmod 755 imagick_type_gen.pl.

  3. Create the .magick folder in your home directory with mkdir ~/.magick.

  4. Run the script and export the output with ./imagick_type_gen.pl > ~/.magick/type.xml.

Now it should work.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy