From: gabaod at hotmail dot com Operating system: Debian Woody PHP version: 4.3.3 PHP Bug Type: GD related Bug description: imageloadfont built in function that indefinately reports errors
Description: ------------ I run debian woody, Php 4.3.3 is installed Php4-gd 4.3.3 is installed libgd2 2.0.15 is installed libpng2 1.0.15 is installed I have also tried the "stable" versions to debian of these which are Php 4.1.2 Php-gd2 4.1.2 libgd2 2.0.1 libpng2 1.0.12 anytime you call the function imageloadfont($font) or die('function does not work'); it always states that the function does not work. I have tried $font to be doc-relative path, root-relative path and aboslute path and each time it always states function does not work. the manual states: imageloadfont() loads a user-defined bitmap font and returns an identifier for the font (that is always greater than 5, so it will not conflict with the built-in fonts). Several problems here. 1. Even if it does load, which it never does, it just states it will be greater than 5, that does not state first time the function imageloadfont() is called it will make it as font #6, second time its called in the same file then it will be #7 etc? Is that how its intended to work? if so document it. 2. Only available help that has shown on this function is to use an outside program called bdf2gd which all it does is create the source files for a gd font. is imageloadfont() looking for a source font file for gd? or a binary source file for gd? I have tested both, and each time its reported function does not work. 3. I have searched your bug reports on this, and only came across 1 valid one that the closed outcome was to use the newer image-font functions. How can the ticket be closed without even fixing the function this was reported on? 4. Last thing i would like to ask is to give a better description of exactly how does this function work, with at least just 1 working example that shows this function does truely work. And Yes i do know it requires a gd font file, how about possibly stating the format of that font file. Source or binary? A gd font source appears as char nameoffontData[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; gdFont nameoffontRep = { numberofchars; valueoffirstchar; widthofchar; heightofchar; nameoffontData }; So please document exactly what is needed to properly use the function imageloadfont() or remove that function completely from the documentation so people like me are not wasting well over 12 hours on trying to figure it out. Reproduce code: --------------- $font = "myfont.gd" imageloadfont($font) or die('function does not work'); Expected result: ---------------- To have it successfully load the font into your function without reporting an error. Actual result: -------------- function does not work -- Edit bug report at http://bugs.php.net/?id=25899&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25899&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25899&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25899&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25899&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25899&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25899&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25899&r=support Expected behavior: http://bugs.php.net/fix.php?id=25899&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25899&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25899&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25899&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25899&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25899&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25899&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25899&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25899&r=float