With ImageMagick, how can you see all available fonts?

后端 未结 6 1606
清歌不尽
清歌不尽 2021-01-31 13:20

ImageMagick can draw text into a picture in a given font, how can I see all available fonts for my system?

6条回答
  •  轮回少年
    2021-01-31 13:42

    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.

提交回复
热议问题