Page 1 of 1

Italics not working

Posted: 2011-04-22T11:39:12-07:00
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

Re: Italics not working

Posted: 2011-04-22T13:30:26-07:00
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

Re: Italics not working

Posted: 2011-04-22T23:44:23-07:00
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