Bug #51135 [Fbk->NoF]: imagettftext does not work for characters > 99999
| From: | php-bugs at lists dot php dot net | Date: | Fri, 05 Mar 2010 05:01:03 +0000 |
| Subject: | Bug #51135 [Fbk->NoF]: imagettftext does not work for characters > 99999 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-148283@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51135&edit=1
ID: 51135
Updated by: php-bugs@lists.php.net
Reported by: sharon_correll at sil dot org
Summary: imagettftext does not work for characters > 99999
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: GD related
Operating System: Windows Vista
PHP Version: 5.2.12
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2010-02-24 22:19:58] pajoye@php.net
or 5.3.3RC2 (http://windows.php.net/qa/)
------------------------------------------------------------------------
[2010-02-24 22:19:37] pajoye@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2010-02-24 20:54:53] sharon_correll at sil dot org
Description:
------------
The imagettftext function doesn't not work for characters > 99999. For
instance, U+1869F (99999) produces a null glyph for the font that I am
using, but U+186A0 (100000) produces "𘚠".
(I am actually using PHP version 5.2.6. Please tell me if upgrading is
likely to fix this problem.)
Reproduce code:
---------------
$point_size = 32;
$scratch_image = ImageCreateTrueColor(
$point_size*10, $point_size*10);
$origin_x = 2 * $point_size;
$origin_y = 5 * $point_size;
$white = ImageColorAllocate($scratch_image, 255, 255, 255);
$black = ImageColorAllocate($scratch_image, 0, 0, 0);
ImageFill( $scratch_image, 0, 0, $white );
$glyph_text = "𘚠";
// FILL IN THE FONT NAME WITH SOME FONT THAT YOU HAVE AVAILABLE:
$box = imagettftext( $scratch_image, $point_size, 0,
$origin_x, $origin_y, $black,
"FONT.TTF, $glyph_text );
$final_image = imagecreatetruecolor( 300, 200 );
ImageFill( $final_image, 0, 0, $white );
imagecopymerge( $final_image, $scratch_image, 0, 0, $box[6], $box[7],
300, 200, 100 );
imagecolortransparent( $final_image, $white );
imagedestroy( $scratch_image );
imagepng( $final_image, "testbug.png" );
Expected result:
----------------
I expect the "testbug.png" file to show a "null" glyph (assuming the
font doesn't have a glyph for U+186A0--I am using Code 2000 which has a
wide range of Unicode characters, but not U+186A0.)
Actual result:
--------------
I see "𘚠" instead of the glyph.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51135&edit=1