ID: 26764 User updated by: choinet at rocketmail dot com Reported By: choinet at rocketmail dot com Status: Bogus Bug Type: GD related Operating System: Windows/Linux PHP Version: 4.3.4 New Comment:
Then how come I *can* pass multiple font files in the example? I can't see how you are so incompetent as to not be able to see it for yourself. Previous Comments: ------------------------------------------------------------------------ [2004-01-02 10:59:23] [EMAIL PROTECTED] There is no bug here, can't you accept that? (and no, you can NOT pass multiple font files to these functions) ------------------------------------------------------------------------ [2004-01-01 23:43:31] choinet at rocketmail dot com Description: ------------ This report stems from bug report #26635, where spaces are not allowed in the pathname. There are more details towards the end of that report (http://bugs.php.net/26635) as to how I am sure that pathnames with spaces do not work. In fact, I have found out that spaces in the fontfile argument gd functions, such as imagettftext() are used to denote multiple fonts, which explains why trying to open pathnames with spaces in them did not work. I have found this by inserting two working paths into the fontfile argument of the above function and alternating their order to verify that they are both being opened correctly. What I am wondering is if there can be a different font list separator character than a space, such as &, that is not used in the directory naming convention to delimit the fonts specified in the fontfile argument, so that users may link to a font file with a space-containing pathname. Reproduce code: --------------- <?php $image = imagecreate(100, 100); // Example 1: no spaces in pathname $path = 'c:\arial.ttf'; imagettftext($image, 12, 0, 50, 50, $color, $path, "Hello"); // Example 2: space in pathname $path = 'c:\test folder\arial.ttf'; imagettftext($image, 12, 0, 50, 50, $color, $path, "Hello"); // Example 3: no spaces in multiple font pathnames $path = 'c:\arial.ttf'; $path2 = 'c:\cour.ttf'; imagettftext($image, 12, 0, 50, 50, $color, "$path $path2", "Hello"); //note the space between the two pathnames // Example 4: spaces in multiple font pathnames $path = 'c:\test folder\arial.ttf'; $path2 = 'c:\test folder\cour.ttf'; imagettftext($image, 12, 0, 50, 50, $color, "$path $path2", "Hello"); //note the space between the two pathnames ?> Expected result: ---------------- I expect no errors in each case. Actual result: -------------- (Taking each example one at a time by commenting out the others) Example 1: (no error) Example 2: Warning: imagettftext(): Could not find/open font in C:\Program Files\Apache Group\Apache2\htdocs\index.php on line 10 Example 3: (no error) Example 4: Warning: imagettftext(): Could not find/open font in C:\Program Files\Apache Group\Apache2\htdocs\index.php on line 20 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26764&edit=1