note 27881 deleted from function.imagettftext by aidan
| From: | aidan@php.net | Date: | Mon, 20 Sep 2004 10:03:50 +0000 |
| Subject: | note 27881 deleted from function.imagettftext by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77035@lists.php.net to get a copy of this message | ||
Note Submitter: sleepy at byteorder dot de
----
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