Page 1 of 1

I am getting error: convert: unable to read font

Posted: 2012-05-04T12:41:32-07:00
by lse123
I am getting error: convert: unable to read font

Code: Select all

Array ( [0] => convert: unable to read font `/usr/share/fonts/default/TrueType/arial.ttf'. ) 

Code: Select all

$font = "Arial";

$cmd = "$original_image \( -clone 0 -thumbnail {$max_width_l}x{$max_width_l} -gravity center -fill rgba\(0,0,0,0.2\) -pointsize 72 -font $font -annotate +0+0 'TEST' -write $new_image_l +delete \) -thumbnail {$max_width_s}x{$max_width_s} $new_image_s";

exec("/usr/local/bin/convert $cmd 2>&1", $array);  
well I insert arial.ttf file in the same directory as my file.php file, well can you recommend, how to fix?

Re: I am getting error: convert: unable to read font

Posted: 2012-05-04T14:38:37-07:00
by Bonzo
$font = "Arial"; should be $font = "arial.ttf";

Re: I am getting error: convert: unable to read font

Posted: 2012-05-07T01:38:50-07:00
by lse123
rgba supported by all ImageMagick vers?

watermark better achieved with -watermark option?

Re: I am getting error: convert: unable to read font

Posted: 2012-05-09T23:59:45-07:00
by anthony
watermark is a synonym for "modulate" composition.

http://www.imagemagick.org/Usage/compose/#watermark