#25371 [Csd->Opn]: imagettftext() in gd2 does not create Japanese text
| From: | moriyoshi@php.net | Date: | Mon, 08 Sep 2003 15:53:04 +0000 |
| Subject: | #25371 [Csd->Opn]: imagettftext() in gd2 does not create Japanese text | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47268@lists.php.net to get a copy of this message | ||
ID: 25371
Updated by: moriyoshi@php.net
Reported By: e_sumiya at f-den dot co dot jp
-Status: Closed
+Status: Open
Bug Type: GD related
Operating System: Windows 2000 server
PHP Version: 4.3.3
New Comment:
Verified w/ win2k professional and the latest snap
Previous Comments:
------------------------------------------------------------------------
[2003-09-08 09:34:16] sniper@php.net
No feedback, assumed fixed in CVS.
------------------------------------------------------------------------
[2003-09-03 06:52:27] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-09-02 19:08:01] e_sumiya at f-den dot co dot jp
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 this bug report at http://bugs.php.net/?id=25371&edit=1