|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-14 22:52 UTC] mgv at userhost dot ru
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 21:00:01 2025 UTC |
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 IHDR??????IDATx???? ?0u???%?$??=3 ???;??? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ?????.{IEND?B`?