views:

619

answers:

1

Greetings.

For a PHP-Project, I have to build PNG-images where I pass some text and then let imagick generate the image for that text. I did this kind of stuff with success in gd, but only had 1 font (per text-generation-block) to play with.

As I want to change between 2+ fonts while generating this textblock I read a lot in Google, but could not find a solution to this problem.

Is there somebody out there who can point me into the correct direction - or even post some sample-code, if possible.

Thanks for that.

A: 

I am not sure if I understand your question, but why do you have to use imagick? Can't you just use imagepng, imagettftext and imagecreate.

imagettftext takes a font as the seventh parameter:

http://php.net/manual/en/function.imagettftext.php

Magicgunnar