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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -