From: north Date: Tue, 6 Feb 2007 20:04:06 +0000 (+0000) Subject: Some improvements on translation of fontnames for the native svg codegen. X-Git-Tag: LAST_LIBGRAPH~32^2~5682 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c29136941e1cb0b6e884b738019912743466095c;p=graphviz Some improvements on translation of fontnames for the native svg codegen. --- diff --git a/lib/common/input.c b/lib/common/input.c index 61aeb8d03..9bed14c31 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -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 =