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 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php