install customized fonts for imagemagick 目录

[//]: #


  1. Download the font, for example, Roboto
  2. Download the processing script for fonts
    chmod +x imagick_type_gen
  3. According to the documents of imagemagick 7 (, ImageMagick is able to load raw TrueType and Postscript font files. It searches for the font configuration file, type.xml, in the following order, and loads them if found:
    <client path>/etc/ImageMagick

So create a dir ~/.config/ImageMagick

mkdir ~/.config/ImageMagick
  1. According the description section in the script imageick_type_gen, create a xml for your fonts using the processing script:
    find /dir/to/font/ -type f -name '*.ttf' | imagick_type_gen -f - > ~/.ImageMagick/type-myfonts.xml
  1. Include the xml in main xml file:
    cat <<EOF >>~/.magick/type.xml
    <include file="type-myfonts.xml" />
  2. Check font using the command:
    convert -list font