I am getting error: convert: unable to read font

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
lse123
Posts: 15
Joined: 2012-03-08T14:22:30-07:00
Authentication code: 8675308

I am getting error: convert: unable to read font

Post 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?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

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

Post by Bonzo »

$font = "Arial"; should be $font = "arial.ttf";
lse123
Posts: 15
Joined: 2012-03-08T14:22:30-07:00
Authentication code: 8675308

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

Post by lse123 »

rgba supported by all ImageMagick vers?

watermark better achieved with -watermark option?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post by anthony »

watermark is a synonym for "modulate" composition.

http://www.imagemagick.org/Usage/compose/#watermark
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply