p***@php.net
2010-02-24 22:19:58 UTC
ID: 51135
Updated by: ***@php.net
Reported By: sharon_correll at sil dot org
Status: Feedback
Bug Type: GD related
Operating System: Windows Vista
PHP Version: 5.2.12
New Comment:
or 5.3.3RC2 (http://windows.php.net/qa/)
Previous Comments:
------------------------------------------------------------------------
[2010-02-24 22:19:37] ***@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.
------------------------------------------------------------------------
Updated by: ***@php.net
Reported By: sharon_correll at sil dot org
Status: Feedback
Bug Type: GD related
Operating System: Windows Vista
PHP Version: 5.2.12
New Comment:
or 5.3.3RC2 (http://windows.php.net/qa/)
Previous Comments:
------------------------------------------------------------------------
[2010-02-24 22:19:37] ***@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/?id=51135&edit=1
Edit this bug report at http://bugs.php.net/?id=51135&edit=1