David Veeneman
David Veeneman

Reputation: 19132

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.

Upvotes: 12

Views: 10994

Answers (2)

Norbert S
Norbert S

Reputation: 273

I had the same problem: -font "Arial-Italic" did not produce italic and -style resulted in an error. However, -font "Times-Italic" works. For whatever reason, many of the italic fonts listed with convert -list font are not functional. Times-Italic is the only one I found that actually produces italic text. I use GraphicsMagick 1.3.28 on Ubuntu 18.04.3 LTS.

Upvotes: 2

moropus
moropus

Reputation: 3782

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

Upvotes: 15

Related Questions