Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.0

Request #4451 Unable to define IMAGE_GRAPH_SYSTEM_FONT_PATH outside of Config.php
Submitted: 2005-05-27 12:51 UTC
From: andrew at m3 dot net Assigned: nosey
Status: Closed Package: Image_Graph
PHP Version: 4.3.10 OS: Fedora Core 3
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 50 - 19 = ?

 [2005-05-27 12:51 UTC] andrew at m3 dot net
Description: ------------ It would be nice to be able to define the IMAGE_GRAPH_SYSTEM_FONT_PATH value outside of the package's Config.php file. We develop a product that uses Image_Graph, and we distribute the required PEAR packages with the product. However, we want to be able to upgrade the packages using pear, so we don't want to make changes to the files in the package, otherwise we have to check the changes are applied each time we update the package. Being able to define the IMAGE_GRAPH_SYSTEM_FONT_PATH value outside of the package would allow us to do this. (The process is very similar to the way the DATE_CALC_BEGIN_WEEKDAY value for the PEAR Date package can be defined outside of the package files.) Reproduce code: --------------- Change: if (isset($_SERVER['SystemRoot'])) { define('IMAGE_GRAPH_SYSTEM_FONT_PATH', $_SERVER['SystemRoot'] . '/Fonts/'); } else { define('IMAGE_GRAPH_SYSTEM_FONT_PATH', ''); } to: if (!defined('IMAGE_GRAPH_SYSTEM_FONT_PATH')) { if (isset($_SERVER['SystemRoot'])) { define('IMAGE_GRAPH_SYSTEM_FONT_PATH', $_SERVER['SystemRoot'] . '/Fonts/'); } else { define('IMAGE_GRAPH_SYSTEM_FONT_PATH', ''); } }


 [2005-05-27 19:05 UTC] pear dot nosey at veggerby dot dk
That is indeed a good idea, and I will most definitely (and have already) add this. I have added it in CVS. /Jesper