Re: With problem about imagestring() function.

From: Date: Thu, 02 Oct 2003 08:51:21 +0000
Subject: Re: With problem about imagestring() function.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164707@lists.php.net to get a copy of this message
On Thursday 02 October 2003 12:52, So-Net wrote: > I'm using windows XP professional sp1 with IIS5.0 > I installed PHP 4.3.3 with GD 2.0 already. > > It is because I'm a Hong Kong people, so we required to draw some strings > that is chinese in language. However, imagestring() cannot show it > properly, so I'm writing to ask whether we can draw the chinese sentence to > the created image ? > > I have tried to use chinese font, but still failed. The following works: header("Content-type: image/jpeg"); $im = imagecreate(400,30); $white = imagecolorallocate($im, 255,255,255); $black = imagecolorallocate($im, 0,0,0); // Replace path by your own font path imagettftext($im, 20, 0, 10, 20, $black, "/usr/share/fonts/ttf/big5/bsmi00lp.ttf", "保護地球從尊重生命開始"); imagejpeg($im); imagedestroy($im); -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Arithmetic is being able to count up to twenty without taking off your shoes. -- Mickey Mouse */

« previous php.general (#164707) next »