]> granicus.if.org Git - graphviz/commitdiff
Some improvements on translation of fontnames for the native svg codegen.
authornorth <devnull@localhost>
Tue, 6 Feb 2007 20:04:06 +0000 (20:04 +0000)
committernorth <devnull@localhost>
Tue, 6 Feb 2007 20:04:06 +0000 (20:04 +0000)
lib/common/input.c

index 61aeb8d03beda9476e0c0a66e97f74f218fcebcd..9bed14c317d3d8bb0832225c35c00faf4843a47e 100644 (file)
@@ -561,6 +561,8 @@ void graph_init(graph_t * g, boolean use_rankdir)
     double xf;
     static char *rankname[] = { "local", "global", "none", NULL };
     static int rankcode[] = { LOCAL, GLOBAL, NOCLUST, LOCAL };
+    static char *fontnamenames[] = {"gd","ps","svg", NULL};
+    static int fontnamecodes[] = {NATIVEFONTS,PSFONTS,SVGFONTS,-1};
     int rankdir;
 
     GD_drawing(g) = NEW(layout_t);
@@ -626,7 +628,8 @@ void graph_init(graph_t * g, boolean use_rankdir)
     GD_ranksep(g) = POINTS(xf);
 
     GD_showboxes(g) = late_int(g, agfindattr(g, "showboxes"), 0, 0);
-    GD_fontmangling(g) = mapbool(agget(g,"fontmangling"));
+    p = late_string(g, agfindattr(g, "fontnames"), NULL);
+    GD_fontnames(g) = maptoken(p, fontnamenames, fontnamecodes);
 
     setRatio(g);
     GD_drawing(g)->filled =