Configure ImageMagick to find all fonts on macOS
ImageMagick checks different files when loading fonts. To see which ones your installation is checking, run this:
magick convert -debug configure -list font 2>&1 | grep -E "Searching|Loading"
In my case, one of those files is ~/.config/ImageMagick/type.xml
. Instead of creating it by hand, I’m going to use a script provided by the ImageMagick project:
mkdir -p ~/.config/ImageMagick
curl -L https://www.imagemagick.org/Usage/scripts/imagick_type_gen > ~/.config/ImageMagick/type_gen
chmod +x ~/.config/ImageMagick/type_gen
Now I’m going to pipe the paths of all font files in my system to the type_gen
script, and write the results to type.xml
:
find /System/Library/Fonts /Library/Fonts ~/Library/Fonts -name "*.[ot]tf" | \
~/.config/ImageMagick/type_gen -f - > \
~/.config/ImageMagick/type.xml
Now ImageMagick will show all those fonts when running this command:
magick convert -list font