Issues using true type fonts

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
Syngress
Posts: 26
Joined: Tue Apr 24, 2007 9:17 am

Issues using true type fonts

Post by Syngress »

Hi,

I am having some issues using truetype fonts in 0.9...I specify in my conf file the name of the font I want to use, and the font is in my weathermap directory, now if I use the web editor to add a new node or make a small change it seems to remove the line in my conf file that is defining the font.

i.e. it removes this line

FONTDEFINE 20 Tahoma 12

Any ideas?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Issues using true type fonts

Post by Howie »

Syngress wrote:Hi,

I am having some issues using truetype fonts in 0.9...I specify in my conf file the name of the font I want to use, and the font is in my weathermap directory, now if I use the web editor to add a new node or make a small change it seems to remove the line in my conf file that is defining the font.

i.e. it removes this line

FONTDEFINE 20 Tahoma 12

Any ideas?
If you add that line, use the font, and NOT edit the map in the editor, does the font appear in the map correctly after one poller cycle?

I think you'll find that it doesn't and that in the cacti.log is a line like

Code: Select all

Failed to load ttf font Tahoma - at config line 12
Because of the way the config reading and writing works, if the font is invalid, it doesn't get written back into the newly edited file.

So the problem is not that the editor removes it, but that the font is incorrectly specified. Unfortunately, the freetype library cabe funny about this. Try adding the .ttf extension, or using the full path to the (full, with .ttf) filename...

Of course, I could be guessing wrong :-) But if the font isn't loaded, then the editor won't write it, so this seems the likely cause.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Syngress
Posts: 26
Joined: Tue Apr 24, 2007 9:17 am

Post by Syngress »

Hi,

Thanks its now fixed, seems I needed to make sure the file had the .ttf extension, even though its not used in the config file.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest