RRD fonts in Windows - what gives ?

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
c4ct1m4n
Posts: 3
Joined: Wed Jan 04, 2012 1:25 pm

RRD fonts in Windows - what gives ?

Post by c4ct1m4n »

Hi Folks,

This is my 4th Windows Cacti build and this time I used the lastest installer (from 21st Dec) rather than build manually as I had before. All seems great...

...apart from having no control over the graph fonts anymore.

I've read a lot about other having problems with this from a while ago, but they're all on Linux hosts. I can't find anything re Windows. I've tried what I think is the 'pango' naming (CourierNew, Courier New...).

In the past I've fixed problem with text lining up by changing to non-proportional font.

Any idea where the default font is specified ?

I may be missing something fundamental here, I just don't understand how something that was so easy previously has been made so hard.

Am I missing something ?

Will I break anything by going back to an older RRDTool ?

cheers :-)

Cacti Version 0.8.7i
Cacti OS win32
SNMP Version NET-SNMP version: 5.6.1.1
RRDTool Version RRDTool 1.4.x
Windows NT 5.2 build 3790 (Windows Server 2003 Standard Edition Service Pack 2) i586
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: RRD fonts in Windows - what gives ?

Post by BSOD2600 »

Yea, the pango font stuff in rrdtool 1.3 and newer is quite a change from before. However, the Windows implementation still only supports a subset of fonts. The last time I checked, the fonts this rrdtool 1.4.5 build supported are:
"segio ui", tahoma, sans, sans-serif, serif, mono, monospace.

For example when you specify serif, it actually checks the the following fonts in this order: "dejavu serif,georgia,angsana new,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi". When I specify "serif", it opens "georgia.ttf". But it does not scan for any other files. So, it's hitting it on the first pass.

libpango-1.0-0.dll (and possibly a pango wiki page somewhere), contains the full implementation details on what fonts are looked for.
c4ct1m4n
Posts: 3
Joined: Wed Jan 04, 2012 1:25 pm

Re: RRD fonts in Windows - what gives ?

Post by c4ct1m4n »

Thanks very much for that BSOD2600, I can see now that there is some control, although clearly very limited.

I've now fixed 90% of the line-up problems using 'monospace'. What I really want is Courier or Courier New, but clearly that's not a question for this forum.

I note that there is no antialising happening, does anyone know if it possible to get antialising or cleartype working on the graphs ?
My graphs remind me of Linux / X11 from the 80's.

thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: RRD fonts in Windows - what gives ?

Post by BSOD2600 »

alright, here is the full listing of the fonts checked in order:
courier = "courier new"
"segoe ui" = "segoe ui,meiryo,malgun gothic,microsoft jhenghei,microsoft yahei,gisha,leelawadee,arial unicode ms,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi"
tahoma = "tahoma,arial unicode ms,lucida sans unicode,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi"
sans = "dejavu sans,tahoma,arial unicode ms,lucida sans unicode,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi"
sans-serif = "dejavu sans,tahoma,arial unicode ms,lucida sans unicode,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi"
serif = "dejavu serif,georgia,angsana new,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi"
mono = "dejavu sans mono,courier new,lucida console,courier monothai,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi"
monospace = "dejavu sans mono,courier new,lucida console,courier monothai,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi"

Screenshot of your aliasing issue? At least looking at my rrdtool 1.4.5 advanced ping graph, it appears as expected (i think).
advancedping - sample.png
advancedping - sample.png (53.26 KiB) Viewed 3282 times
c4ct1m4n
Posts: 3
Joined: Wed Jan 04, 2012 1:25 pm

Re: RRD fonts in Windows - what gives ?

Post by c4ct1m4n »

Many thanks for this, got courier working now.

Your screenshot illustrates my point exactly, your fonts are not anti-aliased.

See below, old install on the left (with "c:\windows\fonts\cour.ttf" looking nice), new install on the right (with "courier" looking jaggy). Both fonts at same size (8):
Capture2.JPG
Capture2.JPG (42.41 KiB) Viewed 3278 times
Capture.JPG
Capture.JPG (21.75 KiB) Viewed 3278 times
norm360
Posts: 1
Joined: Wed Feb 20, 2013 3:21 pm

Re: RRD fonts in Windows - what gives ?

Post by norm360 »

I just installed RRDtool 1.4.5 (bundled with the Cacti Windows Installer).

And I'm encountering the same issue with no anti-aliasing. Is there a fix?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: RRD fonts in Windows - what gives ?

Post by BSOD2600 »

What pango font is specified to be used?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest