ID:               29679
 User updated by:  mgv at userhost dot ru
 Reported By:      mgv at userhost dot ru
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: WindowsXP Pro
 PHP Version:      4.3.9RC1
 New Comment:

With 'E:/a/bkant.ttf' everything is ok. My sorry :)


Previous Comments:
------------------------------------------------------------------------

[2004-08-14 16:49:57] mgv at userhost dot ru

Description:
------------
Software: Apache 1.3.31 & PHP 4.3.8 (GD 2.0.23) / PHP 4.3.9 RC1 (GD
2.0.28) / PHP 4.3.9 RC2-dev (latest snapshot from Aug 14, 2004 12:30
GMT; GD 2.0.28) / PHP 4.3.9 RC2-dev (with GD library from 4.3.8 -
2.0.23).

With this string:
imagettftext($image,11,0,20,20,$color,'E:\bkant.ttf','TEST');

everything is ok. 

But when I copying "bkant.ttf" (or any other font) to any subdirectory
(for example, named "a") and replacing this line with:
imagettftext($image,11,0,20,20,$color,'E:\a\bkant.ttf','TEST');

I had "Problem loading glyph in.." error on PHP 4.3.9 (RC1/2-dev). On
PHP 4.3.8 (or PHP 4.3.9 RC1/2-dev with replaced php_gd2.dll from 4.3.8)
with GD 2.0.23 everything is ok.

Using non-absolute paths (like './fonts/bkant.ttf', when ttf-file
placed under 'fonts' subdir) and/or other slashes combinations
('E:\\a\\bkant.ttf', 'E:/a/bkant.ttf'...) coming with same results.

Reproduce code:
---------------
<?php

$image = imagecreatefromjpeg('./blank.jpg'); // just blank image
(500x250), white color filled
$color = imagecolorallocate($image,0,0,255);

imagettftext($image,11,0,20,20,$color,'E:\a\bkant.ttf','TEST');

header("Content-type: image/png");
imagepng($image);

?>

Actual result:
--------------
Warning: imagettftext() [function.imagettftext.html]: Problem loading
glyph in e:\webserver\host\site\public_html\test.php on line 6
PNG  IHDRIDATx 0u%$=3 ;  
         
         
         
         
         
         
         
         
         
         
         
         
  .{IENDB`


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29679&edit=1

Reply via email to