Word wrap issues with caption

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
qaz123
Posts: 5
Joined: 2011-05-08T10:32:24-07:00
Authentication code: 8675308

Word wrap issues with caption

Post by qaz123 »

is this a bug in imagemagick? somehow when i type the following, word wrap works fine.

Code: Select all

convert -size 400x300 -font Arial-Bold -pointsize 40 -kerning -3 -interline-spacing -10 -gravity NorthWest -background black -fill white caption:"this is a very very very very very very long sentence to test for word wrapping for caption with image magick, the word wrap." -flatten output.png
but when i add some garbage in the sentence the it goes off the canvas.....

Code: Select all

convert -size 400x300 -font Arial-Bold -pointsize 40 -kerning -3 -interline-spacing -10 -gravity NorthWest -background black -fill white caption:"this is a very very very very very very long sentence to test for word wrapping for caption dfg dfgdf gdfg fdgdfg dfg with image magick, the word wrap." -flatten output.png
Why is this? btw, I'm using IM 6.6.9-6 on Windows 7, I'm only testing on Windows, can someone help me determine if Linux has the same problem? I'm hoping this can work on Linux.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Word wrap issues with caption

Post by fmw42 »

convert -size 400x300 -font Arial-Bold -pointsize 40 -kerning -3 -interline-spacing -10 -gravity NorthWest -background black -fill white caption:"this is a very very very very very very long sentence to test for word wrapping for caption dfg dfgdf gdfg fdgdfg dfg with image magick, the word wrap." -flatten
This works fine for me under IM 6.6.9.8 Q16 Mac OSX Tiger. Perhaps an upgrade will help.
qaz123
Posts: 5
Joined: 2011-05-08T10:32:24-07:00
Authentication code: 8675308

Re: Word wrap issues with caption

Post by qaz123 »

I tried with the latest version but the problem still persists, maybe I should try it on linux
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Word wrap issues with caption

Post by anthony »

Check your version of freetype. IM uses that for the font rendering.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply