imagemagick - Imagemagik with php -
fatal error: uncaught exception 'imagickdrawexception' message 'the given font not found in imagemagick configuration , file (/var/www/arial) not accessible' in /var/www/captcha.php:20 stack trace:
0 /var/www/captcha.php(20): imagickdraw->setfont('arial') #1
{main} thrown in /var/www/captcha.php on line 20
i getting following errors when try following
<?php /* create imagick object */ $imagick = new imagick(); /* set font , font size. can specify /path/to/font.ttf */ $imagickdraw->setfont( 'helvetica regular' ); ?>
you need pass filename setfont()
, not font name. e.g:
imagickdraw->setfont('fonts/arial.ttf');
see comment on the php manual page. apparently function accepts filenames relative site root. not accept font names imagick::setfont()
does.
Comments
Post a Comment