Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageMagick: Bold and Italic Fonts?

When using ImageMagick from the command line, how do I specify a bold or italic font?

I have tried the -weight Bold and -style Italic arguments, but they have no effect, at least not on my Windows 7 system. I have tried calling typefaces by name (e.g., -font "Arial Bold Italic") but I get the base font (e.g., "Arial"). I'm using -annotate to overlay a string on a picture.

Thanks in advance for your help.

like image 878
David Veeneman Avatar asked Aug 24 '11 23:08

David Veeneman


1 Answers

Try font name with hyphens: -font "Arial-Bold-Italic" - it worked on my Windows 7 (like you, I couldn't make -style option working). Order of styles (Bold-Italic) is important here.

To see all the fonts available to ImageMagick, use convert -list font (and additionally maybe >C:\fonts.txt, because the list is usually very long).

like image 138
moropus Avatar answered Oct 11 '22 13:10

moropus