#30713 [NEW]: imagettftext() not work with chinese char
From: styeung at pegasus dot org dot hk
Operating system: win2k
PHP version: 4.3.8
PHP Bug Type: GD related
Bug description: imagettftext() not work with chinese char
Description:
------------
ImageTTFText() doesn't work with some chinese(big5) TTF fonts and produce
only UNKNOWN pattern and look alike Bug #28598. I have tried many version
such as 4.3.6; 4.3.8 and also 4.3.10-dev, the bug still exists. As I know,
it is the bug of GD (gdttf.c), but I don't know how to fix it even I have
read their suggestions. Can anyone help me.
My script code :
.....
// Create the image
$png = ImageCreate(200,200);
$bg = ImageColorAllocate($png,0,0,0);
$tx = ImageColorAllocate($png,255,128,128);
// Set Chinese words ("Chinese language" in Chinese Big5)
$string="ÖÐÎÄ";
// Chinese test (need mingli.ttf from MS-Win Chinese ver)
ImageTTFText($png,30,0,0,100,$tx,"arial.ttf",$string);
// Send the image
header("content-type: image/png\n\n");
ImagePng($png);
// Destroy image
ImageDestroy($png);
....
My current php/webserver is AppServ 2.4.1
ie Apache/1.3.31 (Win32) PHP/4.3.10-dev (which manual upgarde from 4.3.8)
--
Edit bug report at http://bugs.php.net/?id=30713&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30713&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30713&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30713&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30713&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30713&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30713&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30713&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30713&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30713&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30713&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30713&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30713&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30713&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30713&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30713&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30713&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30713&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30713&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30713&r=mysqlcfg
Thread (2 messages)
- styeung at pegasus dot org dot hk