Skip to content

When creating RRD error image, font may not exist#4684

Merged
TheWitness merged 3 commits intoCacti:1.2.xfrom
xmacan:fix_font_file
Apr 9, 2022
Merged

When creating RRD error image, font may not exist#4684
TheWitness merged 3 commits intoCacti:1.2.xfrom
xmacan:fix_font_file

Conversation

@xmacan
Copy link
Copy Markdown
Member

@xmacan xmacan commented Apr 8, 2022

No description provided.

Copy link
Copy Markdown
Member

@netniV netniV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be !empty and there's no change log for this ?

@xmacan
Copy link
Copy Markdown
Member Author

xmacan commented Apr 8, 2022

Should be !empty and there's no change log for this ?
Maybe problem with my installation (FreeBSD). Dejavu is installed.
[pm@kaktus ~]$ locate DejaVuSans.ttf
/usr/local/share/fonts/dejavu/DejaVuSans.ttf
/usr/local/share/fonts/dejavu/DejaVuSans.ttf.pkgsave

I haven't investigated why $dejavu_paths is empty or without Sans.

@ddb4github
Copy link
Copy Markdown
Contributor

@xmacan Could u add one line for FreeBSD:

diff --git a/include/global_arrays.php b/include/global_arrays.php
index 56bc6e033..e8506e4d0 100644
--- a/include/global_arrays.php
+++ b/include/global_arrays.php
@@ -2805,6 +2805,7 @@ if ($config['cacti_server_os'] == 'unix') {
                '/usr/share/fonts/dejavu/', //RHEL/CentOS
                '/usr/share/fonts/truetype/', //SLES
                '/usr/share/fonts/truetype/dejavu/', //Ubuntu
+               '/usr/local/share/fonts/dejavu/', //FreeBSD
                __DIR__ . '/fonts'  //Build-in
        );
 } else {

@TheWitness
Copy link
Copy Markdown
Member

@ddb4github, once confirmed, can you file a separate pull request? You can reference the original ticket.

@TheWitness TheWitness merged commit 12627b3 into Cacti:1.2.x Apr 9, 2022
@netniV netniV changed the title fix undefined variable $font_file When creating RRD error image, font may not exist May 15, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants