RE: [PHP] how to change font size when write picture

From: Date: Mon, 20 Nov 2000 03:31:41 +0000
Subject: RE: [PHP] how to change font size when write picture
Groups: php.general 
Request: Send a blank email to php-general+get-26188@lists.php.net to get a copy of this message
Do you have Freetype ttf support compiled in? Have a look at the manual functions: http://www.php.net/manual/function.imagettftext.php <?php Header ("Content-type: image/gif"); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, "/path/arial.ttf", "Testing... Omega: &#937;"); ImageGif ($im); ImageDestroy ($im); ?> -----Original Message----- From: liu zhen [mailto:liu@mint.freemail.ne.jp] Sent: November 20, 2000 11:23 AM To: php-general@lists.php.net Subject: [PHP] how to change font size when write picture hi: I am a new user. I want to make a program which will make a button. I draw the button but when I write text at it, I have meet some question. First , I do not know how to change the text size.The system give 5 font size, but I want define the size by myself.Please help me , thank you . the source is under here. $im = imagecreate($width,$height); $imagebackcolor = ImageColorAllocate($im, intval("0x".substr($backcolor,0, 2),16),intval("0x".substr($backcolor,2,2),16),intval("0x".substr($backcolor, 4,2),16)); $imagetextcolor = ImageColorAllocate($im, intval("0x".substr($textcolor,0,2),16),intval("0x".substr($textcolor,2,2),16 ),intval("0x".substr($textcolor,4,2),16)); imagestring($im, $textfont,$textplacex, $textplacey, $text, $imagetextcolor); Imagejpeg($im); ImageDestroy($im);

« previous php.general (#26188) next »