Italics not working

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?".
Post Reply
jpotter
Posts: 7
Joined: 2011-04-18T07:12:43-07:00
Authentication code: 8675308

Italics not working

Post by jpotter »

I'm trying the following command

/usr/bin/convert -background transparent -font /usr/share/fonts/truetype/ttf-printclearly/PrintClearly_TT.ttf -style Italic -interline-spacing -7.2 -fill "#000000" -pointsize 36 -gravity none -size 480x37 caption:"Enter text here222 ffffff" /DATA/Acellus/Lib_DevGraphics/00001034_568_A1_temp.png

The resulting graphic seems to not be handling the request for italics (-style Italic).

The graphic is built correctly except for the missing italics. Any clue to what I'm doing wrong?

Thanks

Jay
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Italics not working

Post by fmw42 »

Not sure -style is an attribute recognized by caption: or label: So you may have to find an italics font to use.


convert -size 100x -font arial -style italics label:"This is a test" tmp2.png
convert: UnrecognizedStyleType `italics' @ error/convert.c/ConvertImageCommand/2697.

convert -size 100x -font arial -font-style italics label:"This is a test" tmp3.png
convert: unrecognized option `-font-style' @ error/convert.c/ConvertImageCommand/1561.


see http://www.imagemagick.org/Usage/text/#attributes
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Italics not working

Post by anthony »

the -style is used for some font familys such as postscript fonts. It is not used for TTF fonts which generally use a different font to implement italic. However you can fake it using font angles in -annotate.
http://www.imagemagick.org/Usage/text/#annotate
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply