note 27881 added to function.imagettftext

From: Date: Sun, 22 Dec 2002 23:57:56 +0000
Subject: note 27881 added to function.imagettftext
Groups: php.notes 
Request: Send a blank email to php-notes+get-41217@lists.php.net to get a copy of this message
I had to use really small text with this function. Some of the Characters seemed to be bold... I read a article about differences between Mac & PC Systems and that i should use the value/96*72 for the fontsize... This didnt work... I progged a random script and saved all pictures to a folder. Hours later i checked the Files and found out, that the following script will work: <?php header ("Content-type: image/png"); $im = imagecreate (400, 30); $black = imagecolorallocate ($im, 0, 0, 0); $white = imagecolorallocate ($im, 255, 255, 255); imagettftext ($im, 8/81*64, 0, 10, 20, -$white, "sleepy.ttf", "Ich will ein Bier sonst muss ich brechen bla bla bla... ich hasse bier und deshalb schreib ich muell"); imagepng ($im); imagedestroy ($im); ?> The font i used is named silkscreen and should be findable on tha net ;) Hope i will help someone J. F. @ Byteorder -- http://www.php.net/manual/en/function.imagettftext.php http://master.php.net/manage/user-notes.php?action=edit+27881 http://master.php.net/manage/user-notes.php?action=delete+27881 http://master.php.net/manage/user-notes.php?action=reject+27881

« previous php.notes (#41217) next »