[rrd-developers] [patch] generate 'legal' SVG/XML code

Ian Holsman rrd.developers at holsman.net
Wed Nov 19 06:24:24 MET 2003


the code  has 2 problems.

1. it was not printing the right xml and would lead to
" y="98.17 font-family="<value of RRD_DEFAULT_FONT>""

I don't think this is correct, as it should be putting in the font 
family name, not the path/filename of the TTF file.

this patch fixes up the format of the string to make it default xml.
it also shoves 'Helvetica' (it should put svg_default_font in I guess).

so the only problem I still have is the ':' in the comment/gprint fields 
  screwing up the parsing.. any takers.. ???


==
RCS file: /usr/cvs/rrdtool/program/src/rrd_gfx.c,v
retrieving revision 1.14
diff -u -r1.14 rrd_gfx.c
--- rrd_gfx.c   26 Oct 2003 19:29:56 -0000      1.14
+++ rrd_gfx.c   19 Nov 2003 05:17:51 -0000
@@ -1116,8 +1116,11 @@
     svg_write_number(fp, x);
     fputs("\" y=\"", fp);
     svg_write_number(fp, y);
-  if (strcmp(node->filename, svg_default_font))
+
+/*  if (strcmp(node->filename, svg_default_font))
      fprintf(fp, " font-family=\"%s\"", node->filename);
+    */
+   fputs("\" font-family=\"Helvetica", fp);
     fputs("\" font-size=\"", fp);
     svg_write_number(fp, node->size);
     fputs("\"", fp);

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list