Page 1 of 1

latin characters not being rendered with new version

Posted: 2012-12-25T11:35:33-07:00
by davidb3069
I am no longer getting latin characters rendered in convert calls which use caption:'text'. It was working up until recently.

I use Godaddy Linux Hosting and they recently appear to have dropped their 5.xx version support. Their only pathing seems to be /usr/bin/convert which corresponds to ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP on my shared hosting server. I was using /usr/local/bin/convert on their servers but that path does not exist anymore.

I am using a call such as:

-font ../fonts/arial.ttf -pointsize 10

It has worked up until now but it stopped working when the version of ImageMagick I was using went from 5.xx to the 6.5.4-7

I tried switching arial.ttf out with the Arial Unicode MS version found on the MS website with no luck. I had searched and found some people suggesting using the MS.

Help is greatly appreciated.

Thank You.

Re: latin characters not being rendered with new version

Posted: 2012-12-25T11:36:51-07:00
by davidb3069
I should mention that I am using Spanish accent characters and these are not working any longer.

Re: latin characters not being rendered with new version

Posted: 2012-12-25T13:30:11-07:00
by fmw42
I use Godaddy for my web site and running in PHP today the following.

type -a convert

shows two locations:

convert is /usr/bin/convert
convert is /usr/local/bin/convert

then running path/convert -version shows:

/usr/bin/convert has ImageMagick at version 5.5.6 04/01/03
/usr/local/bin/convert has ImageMagick at version 6.2.8 02/25/09 Q16


This does not seem to have changes from what it has always been for me. I do not see any indication of a version 6.5.4-7. What path to convert are you using?

I do not know if Godaddy is slowly upgrading IM on various servers. But the server I am on (Linux) is still at the same old versions.

Try these commands in PHP

<?php
echo "<pre>";
system("type -a convert");
echo "</pre>";
?>


<?php
exec("/usr/bin/convert -version",$out,$returnval);
print_r($out[0]);
?>

<?php
exec("/usr/local/bin/convert -version",$out,$returnval);
print_r($out[0]);
?>

What are they returning for you?

Re: latin characters not being rendered with new version

Posted: 2012-12-25T14:04:39-07:00
by davidb3069
type -a convert returns:

convert is /usr/bin/convert

-version with the /usr/local/bin/convert path:

Array ( [0] => sh: /usr/local/bin/convert: No such file or directory )

-version with the /usr/bin/convert:

Version: ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP http://www.imagemagick.org [2] => Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

###

Different servers are on different versions depending on how recently they have been setup. Godaddy has done it that way for a long time. The question is, why did the latin characters suddenly stop working, even when I use the arial-unicode.ttf?

P.S. Another domain of mine hosted with Godaddy as well has the same 6.5.4.7 setup with only one path.


Thank You.

Re: latin characters not being rendered with new version

Posted: 2012-12-25T15:33:02-07:00
by fmw42
I can only assume that IM 6.5.4.7 might have a bug or that there were not all the right delegates installed.

What do you get from

convert -list configure

at the line starting with DELEGATES

or

convert -list configure | grep -i "DELEGATES"


What was your exact command line? including the text that you want to render

Re: latin characters not being rendered with new version

Posted: 2012-12-25T16:44:47-07:00
by davidb3069
Thank you for your help.

DELEGATES bzlib fontconfig freetype gs jpeg jng jp2 lcms png rsvg tiff x11 xml wmf zlib

command line

/usr/bin/convert -font ../fonts/arial-unicode.ttf -pointsize 10 density 300 -page 1732x3004 -size 1732x3004 -background white -fill black caption:' Copia de cédula de mi cónyuge.' ../img/forms/temp_COVER_LETTER.gif 2>&1

###

Thanks Again.

Re: latin characters not being rendered with new version

Posted: 2012-12-25T23:38:21-07:00
by fmw42
/usr/bin/convert -font ../fonts/arial-unicode.ttf -pointsize 10 density 300 -page 1732x3004 -size 1732x3004 -background white -fill black caption:' Copia de cédula de mi cónyuge.' ../img/forms/temp_COVER_LETTER.gif 2>&1
Possibly a typo but you are missing the - in front of density

/usr/bin/convert -font ../fonts/arial-unicode.ttf -pointsize 10 -density 300 -page 1732x3004 -size 1732x3004 -background white -fill black caption:' Copia de cédula de mi cónyuge.' ../img/forms/temp_COVER_LETTER.gif 2>&1

Have you tried absolute paths?

-page seems redundant or useless when you use -size, here, though I am not an expert on -page in this context.


I tried the following using normal Arial and it works fine for me on IM 6.8.1.3 Q16 Mac OSX Snow Leopard on my home computer (no PHP) and shows the accent marks correctly.

convert -font Arial -pointsize 10 -density 300 -size 1000x -background white -fill black caption:' Copia de cédula de mi cónyuge.' show:

If you are truly using IM 6.5.4.7, then I suspect it has a bug with respect to caption:. Looks like all your needed delegates are available.

Caption: and Label: have undergone many changes. You might review the changelog at http://www.imagemagick.org/script/changelog.php around and after your version of IM.

In my opinion, Godaddy may have finally upgraded (long overdue), but either it is not properly configured or they chose a buggy version in this regard and should have upgraded to a more current version of IM. They only upgraded about half-way from 6.2.8.x to 6.5.4.7 in relation to the current version 6.8.1.3.

P.S. Looking at the changelog, your version may have been a transition version when caption: was defaulting to use pango, whereas in later versions one could configure it for either when pango: was made a separate function. However, I do not recall all the details of the transition.

Re: latin characters not being rendered with new version

Posted: 2012-12-26T05:34:47-07:00
by davidb3069
I copied and pasted the code and missed the dash in there for density. Thanks.

I am not sure if we can request that Godaddy change to a different version of ImageMagick. I suspect not. I will try though.

Have not tried absolute paths, although I can say that all other text is rendered except any word with a latin character. It drops the word completely.

Not sure what is the best, most stable version after this version I am using that I could ask Godaddy to install.

I may be a few days getting back to this discussion as I am traveling for the holidays but appreciate the help and suggestions.

Re: latin characters not being rendered with new version

Posted: 2012-12-26T11:38:47-07:00
by fmw42
Perhaps they can switch your web site to one of the servers that still has the older version of IM.

Re: latin characters not being rendered with new version

Posted: 2012-12-26T14:52:33-07:00
by davidb3069
That is an idea too.

Thank you.