Warm tip: This article is reproduced from serverfault.com, please click

ImageMagick: Bold and Italic Fonts?

发布于 2011-08-24 23:15:15

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.

Questioner
David Veeneman
Viewed
0
moropus 2011-08-25 14:49:20

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).