Update of /cvsroot/secureideas/base-php4/docs
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv2221/base-php4/docs
The fonts for the BASE charts are still a problem.
1. The font name can now be chosen by the user in base_conf.php.
2. For php versions >= 5.0.0 base_graph_display.php makes now
use of exceptions to get better error messages. This should
help the users to get to grips with the font problem.
3. The base_graph_display.php produces a png, so that printing an
error message as text to the screen would lead to a screwed png.
From now on and for php versions >= 5.0.0 only, errors that occur
on occasion of $Graph->Done() are written into a png, so that errors
appear right on the screen rather than just in apache's error_log.
This should also help the users to find out what is wrong.
For further details: See docs/README.graph_alert_data.
RCS file: /cvsroot/secureideas/base-php4/docs/README.graph_alert_data,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- README.graph_alert_data 13 Dec 2009 00:39:56 -0000 1.3
+++ README.graph_alert_data 29 Dec 2009 07:37:42 -0000 1.4
@@ -21,16 +21,61 @@
+b) Solution for php versions < 5.3:
-The font defined in the $font_name variable in base_graph_display.php
-could apparently not be found. This can NOT be fixed by any setting
-in fontmap.txt. Rather, it can be solved by modifying the
+The fonts can be configured in fontmap.txt and in base_conf.php.
-So ignore fontmap.txt completely and apply the following patch to
-/usr/share/pear/Image/Canvas.php, provided that the font file
-DejaVuSans.ttf can be found in /usr/share/fonts/dejavu/.
+aa) In base_conf.php:
+$graph_font_name = "Verdana";
+bb) The file fontmap.txt can be found in the PEAR directory
+under Image/Canvas/Fonts/, e.g.:
+One possibility on fedora 9 could be, for example:
+rpm -Uvh dejavu-lgc-fonts-2.24-3.fc9.noarch.rpm
+Verdana Bold Italic,/usr/share/fonts/dejavu/DejaVuLGCSans-BoldOblique.ttf
+c) Solution for php versions >= 5.3:
+While for php versions < 5.3 configuring
+did lead to proper fonts, this does not seem to work, any more, for
+newer php versions. At least in fedora 12 the fontmap.txt file
+is now in
+but this is not reflected by the PEAR::Image::Canvas library. The
+library does not find fontmap.txt, any more.
+So ignore fontmap.txt completely and do the following:
+aa) In base_conf.php:
+$graph_font_name = "DejaVuSans";
+bb) Apply the following patch to /usr/share/pear/Image/Canvas.php,
+provided that the font file DejaVuSans.ttf can be found in
Of course, you can adjust this to your own system and your own ideas: