Page 1 of 2

bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-12T17:59:26-07:00
by fmw42
IM 6.7.6.0 Mac OSX Snow Leopard

Caption with PANGO is not honoring gravity.

I tried Anthony's command from http://www.imagemagick.org/Usage/text/#caption



convert -background lightblue -fill blue -font Candice -pointsize 40 \
-size 320x -gravity Center caption:'ImageMagick Rules OK!' \
caption_centered.gif

But the result is left justified.

Image

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T11:00:34-07:00
by fmw42
No rush on my part, but has this been verified?

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T11:28:30-07:00
by magick
We have not had a chance to review this problem. Stand by...

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T11:35:08-07:00
by fmw42
magick wrote:We have not had a chance to review this problem. Stand by...
OK. Not urgent on my part. Just wanted to know if you had seen this report.

Thanks.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T15:22:29-07:00
by magick
We can reproduce the problem you posted and have a patch. Look for it in ImageMagick-6.7.6-1 Beta by sometime tomorrow.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T16:49:41-07:00
by magick
It looks like we're going to need to separate caption: into two coders, caption: and pango: as Anthony recommends. There are a number of minor differences between Pango rendering and Freetype rendering.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T17:22:52-07:00
by fmw42
OK. Probably best to separate them anyway.

Will the new pango: support -gravity (properly)?

Fred

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T17:48:25-07:00
by magick
Yes.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-14T22:11:09-07:00
by anthony
Caption with pango formated text is now broken.

convert -define caption:markup=true -define caption:justify=center caption:"`cat im/STORE/pango_test.txt`" show:

convert: must specify image size `<markup>.....

That is -size is not needed for pango, but the if I give a -size then the text is not interpreted as pango text but a string caption.


Also... Can we PLEASE: make pango a different coder to that of normal caption: It would make the above problems easier to deal with, and more backward compatible.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-15T03:58:13-07:00
by magick
Already done. Pango is now a separate coder. We'll fix the other problem you reported sometime today.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-15T22:08:49-07:00
by anthony
magick wrote:Already done. Pango is now a separate coder. We'll fix the other problem you reported sometime today.
I see it in IMv7 but I don't think you have commited the changes to IMv6

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-17T14:25:50-07:00
by fmw42
I just upgraded to IM 6.7.6.1 Q16 Mac OSX Snow Leopard. The changelog appears to indicate that CAPTION and PANGO have been separated and that they are now gravity sensitive again.


I have pango installed. But from convert -list format

CAPTION* CAPTION r-- Caption (Pangoft2 1.28.4)

There is no PANGO listed.

So something is wrong as CAPTION is still using Pango



Also neither of the following work correctly:


# this one is still left justified (as posted in the first messages above)
convert -background lightblue -fill blue -font Candice -pointsize 40 \
-size 320x -gravity Center caption:'ImageMagick Rules OK!' \
caption_centered.gif

# this one gives an error message
convert -background lightblue -fill blue -font Candice -pointsize 40 \
-size 320x -gravity Center pango:'ImageMagick Rules OK!' \
pango_centered.gif

convert: no decode delegate for this image format `ImageMagick Rules OK!' @ error/constitute.c/ReadImage/532.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-17T15:59:55-07:00
by magick
We can reproduce the problem you reported and have a patch. Look for it by sometime tomorrow. Thanks.

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-18T18:03:52-07:00
by anthony
I can't seem to get "pango" to interpret the text as "pango text".


convert pango:`cat pango_test.txt` show:

Code: Select all

Use of assignment to $[ is deprecated at /usr/bin/html2ps line 3408.
...lots more errors... only the first bit is displays as unformated text

Code: Select all

convert pango:'@pango_test.txt' show:
...the markup itself as unformated text...

Code: Select all

convert -define pango:markup=true pango:'@pango_test.txt' show:
.. no change...

For pango, the use of markup should be default action, there is no need for a pango:markup define!

Re: bug caption with PANGO IM 6.7.6.0

Posted: 2012-03-19T04:56:52-07:00
by magick
We applied a patch to fix the problem you reported. Also note, we will support color markup soon.