[rrd-developers] rrdtool-1.2.28: no fonts on graphics in cacti

Tobias Oetiker tobi at oetiker.ch
Fri Nov 7 23:46:21 CET 2008


Sebastian,

the problem with this code is that it sets the font to an empty
file


anyway, the fix is simple ... (I think)

===================================================================
--- branches/1.2/program/src/rrd_graph.c        (revision 1645)
+++ branches/1.2/program/src/rrd_graph.c        (working copy)
@@ -3641,7 +3641,7 @@
                         if (size > 0){
                               im->text_prop[propidx].size=size;
                       }
-                        if ((int)strlen(optarg) > end){
+                        if ((int)strlen(optarg) > end+2){
                           if (optarg[end] == ':'){
                              strncpy(im->text_prop[propidx].font,optarg+end+1,255);
                              im->text_prop[propidx].font[255] = '\0';






Today Sebastian Harl wrote:

> Hi Tobi,
>
> On Fri, Nov 07, 2008 at 07:59:09AM +0100, Tobias Oetiker wrote:
> > > On Tue, Nov 04, 2008 at 10:25:18PM +0300, Peter Volkov wrote:
> > > > We've received a bug report about broken graphs in cacti after upgrade
> > > > to rrdtool-1.2.28 [1]. At the same time 1.2.27 works fine.
>
> > could you elaborate what breaks, or maybe provide a sample rrdtool
> > script that shows the problem ?
>
> The generated graphs do not contain any text when rrdgraph(1) has been
> called with the following options:
>
>  --font TITLE:12: \
>  --font AXIS:8: \
>  --font LEGEND:10: \
>  --font UNIT:8: \
>
> I had already reported this issue in August [1] in a reply to Debian bug
> #493575 [2]. Since Debian no longer ships 1.2.28, I did not further
> follow this issue though.
>
> HTH,
> Sebastian
>
> [1] Message-ID: <20080806064235.GI21109 at albany.tokkee.org>
> [2] http://bugs.debian.org/493575
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list