With ImageMagick, how can you see all available fonts?

Solution 1:

depending on your imagemagick version:

convert -list type       # for IM older than v6.3.5-7
convert -list font       # for newer versions

also the output format changed...

-- update For OsX (Answer from Charles Merriam) if the command above does not produce any results:

For a full tutorial with description see http://gothick.org.uk/2008/03/14/using-os-x-fonts-in-imagemagick/ for the rest &tldr:

# use fondu to convert fonts and update locatedb
sudo port install fondu 
cd /usr/local/share/fonts/
fondu /Library/Fonts/*.dfont
/etc/periodic/weekly/310.locate

# generate imagemagick type.xml 
cd ~
mkdir ~/.magick
wget http://www.imagemagick.org/Usage/scripts/imagick_type_gen
perl imagick_type_gen > ~/.magick/type.xml

Solution 2:

To list only the font names, do convert -list font | grep Font

Solution 3:

The fonts are a bit tricky. ImageMagick will not usually 'see' your system fonts. On OS/X, fonts are stored in a non-standard format.

Use convert -list font to see the fonts ImageMagick currently knows about. It may be blank.

ImageMagick looks for $HOME/.magick/type.xml for the list of fonts. If you are on OS/X, go see the well written tutorial at http://gothick.org.uk/2008/03/14/using-os-x-fonts-in-imagemagick/.

Solution 4:

If you have recently installed a font which is not appearing when using:

convert -list font

You can flush your font cache with:

fc-cache -f -v

Solution 5:

Your OS file system will list all your fonts.

But if you are asking about fonts that Imagemagick knows about for use by name, then use convert -list font to see all those fonts listed in its type.xml file.

If that shows nothing, then if you are on a unix-like platform, you can use the perl script by Anthony Thyssen to install your fonts into the type.xml file rather than doing them by hand. See https://www.imagemagick.org/Usage/scripts/imagick_type_gen.

Then doing convert -list font should list the ones that Imagemagick recognizes and you can then use them by name -font fontname . Otherwise, you need to provide the full path to the font file -font path/to/font.suffx.