From: ellson Date: Mon, 17 Jul 2006 18:56:22 +0000 (+0000) Subject: consolidate font resolution verbose messages X-Git-Tag: LAST_LIBGRAPH~32^2~6064 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b77c2f43f1a900a3ddd635d92fad9a68e15947e3;p=graphviz consolidate font resolution verbose messages --- diff --git a/lib/common/fontmetrics.c b/lib/common/fontmetrics.c index a3514a1e1..43620bb6a 100644 --- a/lib/common/fontmetrics.c +++ b/lib/common/fontmetrics.c @@ -173,7 +173,7 @@ pointf textsize(graph_t *g, textpara_t * para, char *fontname, double fontsize) if (Verbose) { if (emit_once(para->fontname)) { - fprintf(stderr, "%s: fontname=%s fontpath=%s\n", + fprintf(stderr, "%s: fontname \"%s\" resolved to \"%s\"\n", GD_gvc(g)->common.cmdname, para->fontname, fontpath); } } diff --git a/plugin/pango/gvtextlayout_pango.c b/plugin/pango/gvtextlayout_pango.c index 4add1ba6f..2b09eadb9 100644 --- a/plugin/pango/gvtextlayout_pango.c +++ b/plugin/pango/gvtextlayout_pango.c @@ -125,24 +125,12 @@ static void pango_textlayout(GVCOMMON_t *common, textpara_t * para, char **fontp /* try to find a match for a PostScript font * - or just get best available match */ - if (common->verbose) - fprintf(stderr, "Font: \"%s\"", fontname); - - if ((fontreq = find_postscript_font(fontname))) { - if (common->verbose) - fprintf(stderr, " (ps) translated to: \"%s\"", fontreq); - } - else + if (! (fontreq = find_postscript_font(fontname))) fontreq = fontname; desc = pango_font_description_from_string(fontreq); - if (common->verbose) { - family = pango_font_description_get_family (desc); - if (strcmp(family, fontreq) == 0) - fprintf(stderr, " resolved.\n"); - else - fprintf(stderr, " resolved to: \"%s\"\n", family); - } } + family = pango_font_description_get_family (desc); + *fontpath = (char *)family; pango_font_description_set_size (desc, (gint)(para->fontsize * PANGO_SCALE)); @@ -170,9 +158,6 @@ static void pango_textlayout(GVCOMMON_t *common, textpara_t * para, char **fontp *fontpath = NULL; /* indicate a problem */ logical_rect.height = 0; } - else { - *fontpath = "[pango]"; - } para->width = (double)logical_rect.width / PANGO_SCALE; para->height = (double)logical_rect.height / PANGO_SCALE;