Caption not wrapping on some sentences

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
alasdairdf
Posts: 53
Joined: 2012-05-15T04:56:50-07:00
Authentication code: 13

Caption not wrapping on some sentences

Post by alasdairdf »

I'm using the latest version of IM, compiled from source, and the following code does not wrap the text:

Code: Select all

convert -limit thread 1 -background transparent -colorspace CMYK -font "smallcaps.otf" +pointsize -size 1335x806 -gravity center -fill "rgb(28,22,17)" caption:"Essays on the Drama, Edited With an Introduction and Notes" -trim -write working.mpc -format "%wx%h" info:-
For most sentences it will wrap nicely, but for some, such as the example given here "Essays on the Drama, Edited With an Introduction and Notes", the whole title is on one line and difficult to read because of this, with a lot of white space above and below when I position it centered in the 1335x806 space for which it is intended.

For an example of what it looks like in the final image, see here:
http://us-fs.forgottenbooks.org/image.p ... 1000005673

For most sentences it looks nice, like this:
http://us-fs.forgottenbooks.org/image.p ... 1000004148

Older versions of IM did not have this problem (but had another problem where sometimes words would be wrapped onto the next line, which was even worse).

Any idea what this is about?

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

Re: Caption not wrapping on some sentences

Post by fmw42 »

It works just fine for me on IM 6.7.6.10 Q16 Mac OSX Snow Leopard. I had to download smallcaps.otf. So I am not sure it is the very same font. Have you tried other fonts?

My guess is that it might be your font set or you are on an IM release with a bug. Try upgrading. You don't say what version of IM (or platform) you are using! Saying latest version, is not often helpful as versions change rapidly.
alasdairdf
Posts: 53
Joined: 2012-05-15T04:56:50-07:00
Authentication code: 13

Re: Caption not wrapping on some sentences

Post by alasdairdf »

My guess is that it might be your font set or you are on an IM release with a bug. Try upgrading. You don't say what version of IM (or platform) you are using! Saying latest version, is not often helpful as versions change rapidly.
ImageMagick 6.7.6-9 2012-05-16 Q16
It works just fine for me on IM 6.7.6.10 Q16 Mac OSX Snow Leopard. I had to download smallcaps.otf. So I am not sure it is the very same font. Have you tried other fonts?
I'm on CentOS 6.2 64-bit. The font is a professional one purchased from fonts.com, so I doubt the problem lies there. This only occurs on 1/100 sentences, and any change in font changes that because the particular combinations of words, letters and their sizes, which changes when this issue occurs.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Caption not wrapping on some sentences

Post by fmw42 »

Does it fail every time with this sentence and font? Otherwise, I do not know what else to suggest. So I will leave this to the IM developers.
alasdairdf
Posts: 53
Joined: 2012-05-15T04:56:50-07:00
Authentication code: 13

Re: Caption not wrapping on some sentences

Post by alasdairdf »

Yes, it does the same thing every time with the same font & text.
alasdairdf
Posts: 53
Joined: 2012-05-15T04:56:50-07:00
Authentication code: 13

Re: Caption not wrapping on some sentences

Post by alasdairdf »

Should I create a new topic under the bug reports forum, or just wait for someone to notice it here?

Thank you for your help.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Caption not wrapping on some sentences

Post by fmw42 »

If it were me, I would repost to the bugs forum as it might get faster review. But put a link back to the post in the user's forum for reference. But explain the issue again in the bugs forum.

Have you tried upgrading to IM 6.7.6.10, though I doubt that is the issue? Caption was being worked on a little while ago, but before your release. See http://www.imagemagick.org/script/changelog.php
Post Reply