Caption word wrapping fails with punctuation

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
arthur
Posts: 7
Joined: 2015-04-03T01:50:18-07:00
Authentication code: 6789

Caption word wrapping fails with punctuation

Post by arthur »

Hello,

I am trying to word-wrap some text to a specific width:

Code: Select all

convert -size 60x -pointsize 40 caption:'b, c' a.png
but it looks like imagemagick ignores the comma and render in only one line instead of wrapping after the "b," (the text "b c" renders in less than 60px on only one line) ; if I try to render "b, c ", since "b c " renders in more than 60px, "b, c " renders on two separate lines as expected.

The pango method renders correctly, but I also need to use a custom ttf font without changing some system files is this possible ?

Thank you for your help,
Arthur
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Caption word wrapping fails with punctuation

Post by snibgo »

It works as expected for me (IM 6.9.1.0 on Windows 8.1), breaking a line when it is too long. Your example "b, c" doesn't break for me because it fits in the given width.

What version IM are you on? Can you link to a failing example?
snibgo's IM pages: im.snibgo.com
Post Reply