From: ellson Date: Sat, 25 Jun 2005 23:00:52 +0000 (+0000) Subject: fix for double scaling. X-Git-Tag: LAST_LIBGRAPH~32^2~7493 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b27ab5c011fe507062baf88e402e17cc9adbddd;p=graphviz fix for double scaling. fix for font size under scaling --- diff --git a/lib/common/svggen.c b/lib/common/svggen.c index 366e370fb..c135cc0f8 100644 --- a/lib/common/svggen.c +++ b/lib/common/svggen.c @@ -113,6 +113,7 @@ static int N_pages; static int onetime = TRUE; static int Rot; +static double Scale; static pointf CompScale; static pointf Offset; @@ -317,14 +318,15 @@ static void svg_font(context_t * cp) { char *color, buf[BUFSIZ]; int needstyle = 0; + double fontsz = cp->fontsz * Scale; strcpy(buf, " style=\""); if (strcasecmp(cp->fontfam, DEFAULT_FONTNAME)) { sprintf(buf + strlen(buf), "font-family:%s;", cp->fontfam); needstyle++; } - if (cp->fontsz != DEFAULT_FONTSIZE) { - sprintf(buf + strlen(buf), "font-size:%.2f;", (cp->fontsz)); + if (fontsz != DEFAULT_FONTSIZE) { + sprintf(buf + strlen(buf), "font-size:%.2f;", fontsz); needstyle++; } color = svg_resolve_color(cp->pencolor, 1); @@ -484,12 +486,15 @@ svg_begin_page(graph_t * g, point page, double scale, int rot, point offset) { Rot = rot; + Scale = scale; /* its really just a page of the graph, but its still a graph, * and it is the entire graph if we're not currently paging */ svg_printf("