Home » Images » Image_Graph » Bug #2675
Font name is lowercased
Details
| Submitted | 2004-11-02 17:56 UTC |
|---|---|
| From | bmansion at mamasam dot com |
| Assigned | nosey |
| Status | Closed |
| Package | Image_Graph |
| PHP Version | 5.0.2 |
| OS | OSX Panther |
| Roadmaps | (Not assigned) |
Comments
[2004-11-02 17:56 UTC] bmansion at mamasam dot com
Description:
------------
Font filenames should not be lowercased in Image_Graph_Font_TTF::setfontFile().
[2004-11-02 18:42 UTC] pear dot nosey at veggerby dot dk
Assuming you mean:
if (strtolower(substr($fontFile, -4)) != '.ttf') {
since it is the only lowercase entry in the file
The font name is not lowercased, only to check if the extension is .ttf (case insensitive).
It is true that if the .ttf (case insensitive) extension is missing it is added as lowercase .ttf, so if you need it be uppercase simply specify it as uppercase.
If this isn't the case, please elaborate.
[2004-11-02 22:27 UTC] bmansion at mamasam dot com
Sorry, you can close the bug, that was a problem with my cache.
I guess you are aware that a very small number of the examples you provide on http://pear.veggerby.dk actually work with Image_Graph.
This one :
http://pear.veggerby.dk/samples/index.php?sample=07
Gives a lot of errors. It starts with:
Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /usr/lib/php/Image/Graph/Color.php on line 64
(and a notice about $newlabels being undefined, it is a good idea to use E_ALL when you develop).
Are those examples supposed to work or are you going to fix them ? Do they really work for you ? Thanks for letting me know.
[2004-11-03 07:27 UTC] pear dot nosey at veggerby dot dk
I bet you it's because they use the Arial font, which the samples use as if it was located in the Fonts/ directory. We do not supply arial.ttf with the package due to 1) size 2) not sure of copyright! They *all* work fine for me, and does *not* work when applying 0.3.0dev1, but works again when copying arial.ttf to Fonts/
Regarding E_ALL, of course I actually thought I did, but it appears that I switched back to E_ALL & ~E_NOTICE some time, whoops. I'll verify the package with E_ALL! Thx.
[2004-11-03 08:50 UTC] bmansion at mamasam dot com
I don't understand what you say. Do the examples all work for you with 0.3.0dev1 or not ? Arial is not the problem here because I am using my own font and I modified the path and font names accordingly.
If the examples work for you, are you using a modified version of Image_Graph ?
[2004-11-03 08:59 UTC] pear dot nosey at veggerby dot dk
The examples work for me with 0.3.0dev1 WHEN I copy arial.ttf to the Fonts/ directory!