Fresh compilation of latest imagemagick source, on Ubuntu Lucid.
convert version: ImageMagick 6.7.9-0 2012-08-22 Q16 http://www.imagemagick.org
I am trying to generate a close-fitting white "cloud" or "speech bubble" closely surrounding/following the shape of generated black text.
The resulting generated image must be word-wrapped (hence "caption" here)
The resulting generate image must fit within a 260px-wide square (hence the specification via "size")
Applying a heavy stroke to text entered via "caption" yields favorable results except that are cut off on the right side. If I generate the black text via caption all by itself, it displays nicely within the dimensions. With both generated together, as below, both the black text and the white cloud text are cut off to the right, as pictured.
What I have:
Code: Select all
convert -background gray -fill white -gravity center -font /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf -pointsize 16 -size 260x -stroke white -strokewidth 25 caption:'Sample writing, text cut off to the right' -background transparent -fill black -stroke none caption:'Sample writing, text cut off to the right' -gravity center -compose over -composite caption.png
I would appreciate any advice. A hack that requires a couple of commands is fine if necessary. Thanks to anyone who can help!