From:             e_sumiya at f-den dot co dot jp
Operating system: Windows 2000 server
PHP version:      4.3.3
PHP Bug Type:     GD related
Bug description:  imagettftext() in gd2 does not create Japanese text

Description:
------------
Imagettftext() in php_gd2.dll does not create Japanese text image. But
php_gd.dll(in win32 zip package of 4.3.1) create the image properly.

Environment:
Japanese windows 2000 server + SP4
IIS



Reproduce code:
---------------
<?
$im = imagecreate (400,100);
$black = imagecolorallocate ($im,0,0,0);
$red = imagecolorallocate ($im,255,0,0);
$white = imagecolorallocate ($im,255,255,255);

imageline ($im,0,0,100,100,$red);
$font = "c:/winnt/fonts/MSGOTHIC.ttc";
$str = "��123";
$str = mb_convert_encoding($str, "UTF-8", "SJIS");
imagettftext($im,24,0,20,30,$white,$font,$str);
header("Content-type: image/png");
header("Cache-control: no-cache");
imagepng($im);
imagedestroy($im);
?>


Expected result:
----------------
The program produces a PNG image with one Japanese character(Unicode 611B)
and three numbers(123).  

Actual result:
--------------
The program produces a PNG image with two Japanese characters(Unicode
30FB) and three numbers(123). 

-- 
Edit bug report at http://bugs.php.net/?id=25371&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25371&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25371&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25371&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25371&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25371&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25371&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25371&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25371&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25371&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25371&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25371&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25371&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25371&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25371&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25371&r=gnused

Reply via email to