From:             sharon_correll at sil dot org
Operating system: Windows Vista
PHP version:      5.2.12
PHP Bug Type:     GD related
Bug description:  imagettftext does not work for characters > 99999

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 bug report at http://bugs.php.net/?id=51135&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51135&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51135&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51135&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51135&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51135&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51135&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51135&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51135&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51135&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51135&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51135&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51135&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51135&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51135&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51135&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51135&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51135&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51135&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51135&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51135&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51135&r=mysqlcfg

Reply via email to