oversized bandwidth label boxes

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
cerbum
Posts: 9
Joined: Fri Jan 15, 2010 8:27 am

oversized bandwidth label boxes

Post by cerbum »

Attached a screen snippet.

It seems that both in classic and angled for BWSTYLE there is a "header" above all of the numbers given as bandwidth usage. This space is a bit of a waste, and ends up making compact maps harder.

I've looked at "BWOUTLINECOLOR none" and "BWBOXCOLOR none" from the "my map is ugly" topic here, and while that gets rid of the header space I actually want a box still wrapped around the label.

Is there a way that I am unaware of to lop off the header of the box and just have the top of the box be the same distance away from the characters as the bottom of the box?

Thanks,

-cerbum
Attachments
Picture 1.png
Picture 1.png (44.84 KiB) Viewed 2069 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

It's usually to do with the bounding-box information in the truetype font - some fonts have bad information, which means Weathermap leaves too much/too little space - the angled boxes there are actually too short *and* too tall.

I would try a different font.

I'll look into adding some 'fudge factor' SET variables to fine tune this stuff, perhaps.
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!)
cerbum
Posts: 9
Joined: Fri Jan 15, 2010 8:27 am

Post by cerbum »

Howie wrote:It's usually to do with the bounding-box information in the truetype font - some fonts have bad information, which means Weathermap leaves too much/too little space - the angled boxes there are actually too short *and* too tall.
Okay, so It's not just me.

Howie wrote: I would try a different font.
Got it. I'm working my way through a few different fonts to see if I can improve on what I've got. I already found one that makes it worse!
Howie wrote: I'll look into adding some 'fudge factor' SET variables to fine tune this stuff, perhaps.
Don't spend a lot of time on this -- it's not a feature request.

I wanted to make sure that I wasn't missing a configuration option that solved the problem.

Thanks,

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

Post by Howie »

I've been investigating this, and found these two bug reports.

One for GD, where someone else has gone through a lot of diagnosis:
http://bugs.libgd.org/?do=details&task_id=76

followed by one for FreeType, with no response:
http://savannah.nongnu.org/bugs/?19813

Both those bugs are from 2007, which doesn't bode well.

At first I thought I had rounding errors in my box rotation code, because I could replicate a similar problem with only a 1 degree rotation, but having tried rotating backwards and forwards hundreds of times, it's not that, because it doesn't get worse.

So GD tells weathermap that text will by n pixels long, but when it's angled, it's actually >n. It seems the only solutions for me would be to stop using GD (pain) or add in some slop so it's not so obvious with text actually hitting the box (ugly).

So I'm going with ugly for now, so I can get on with multi-line labels. I've had a back-burner project to switch to a different graphics library, and possibly a different language, but not soon.
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest