New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errorimage does not render on systems without GD ttf support #1351
Comments
This is actually not because of that but because you don't have TrueType enabled on your system and there is a bug with the imagestring call. It should be using $text_color not $font_color. At line 3362, it allocates the color correctly. However, at line 3401 when it tries to use image_string() it's using font_color which is actually a hex encoded RGB string so would never work. |
Try this patch: diff --git a/lib/rrd.php b/lib/rrd.php
index b7688ac..59662f0 100644
--- a/lib/rrd.php
+++ b/lib/rrd.php
@@ -3398,7 +3398,7 @@ function rrdtool_create_error_image($string, $width = '', $height = '') {
} else {
foreach($strings as $string) {
if (trim($string) != '') {
- if (!imagestring($image, $font_size, $xpos, $ypos, $string, $font_color)) {
+ if (!imagestring($image, $font_size, $xpos, $ypos, $string, $text_color)) {
cacti_log('Text overlay failed');
}
$ypos -= ($font_size + $padding); |
Errorimage does not render on systems without GD ttf support
This issue is resolved now. Thanks for taking the time to report. |
Not sure when happened, but I think it's because RRD file not existing and try to Turn On Data Source Debug Mode.
The text was updated successfully, but these errors were encountered: