Need some help perfecting IM as a script

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Need some help perfecting IM as a script

Post by fmw42 »

send the results to a txt file so you can read it easiy

convert -list font > fonts.txt

This produces a list fonts on your system. But only those with the suffixes that I listed above can be used by IM. They are:

True Type Fonts (ttf)
Ghostscript Fonts (afm)
Open Type Fonts (otf)

If there is a font, that is of these types that you want to use, then you can load it and use it by providing its full path to the font file rather than just by name. In fact any of the above fonts that are on your system with these suffixes, can be called by using the full path to the font file which is listed to the fonts.txt file.

You can also see the same fonts by opening or listing the type.xml file where ever that is on your system.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Need some help perfecting IM as a script

Post by snibgo »

This Windows BAT script makes a useful sampler of all fonts:

Code: Select all

setlocal enabledelayedexpansion

set SAMP_TEXT=ABCDEFabcdef

del font_list.lis

for /F "usebackq tokens=1,2 delims=: " %%E in (`convert ^
  -list font`) do if "%%E"=="Font" (

  echo ^( -font %%F label:%%F_%SAMP_TEXT% ^) >>font_list.lis
)

convert -pointsize 20 @font_list.lis -append font_samp.png
snibgo's IM pages: im.snibgo.com
Post Reply