From: oetiker Date: Fri, 4 Jan 2008 22:53:46 +0000 (+0000) Subject: fontmap resolution was not matching scaled_font resolution ... this killed layouting... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=37f9575eecddf13374595b5df550bdcbef4adc24;p=rrdtool.git fontmap resolution was not matching scaled_font resolution ... this killed layouting ... much better now git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1264 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index f91240c..fc8b0bd 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -146,7 +146,9 @@ static PangoLayout *gfx_prep_text( layout = pango_cairo_create_layout(cr); pango_context = pango_layout_get_context(layout); pango_cairo_context_set_font_options(pango_context, im->font_options); - pango_cairo_update_context(cr, pango_context); + pango_cairo_context_set_resolution(pango_context,100); + +/* pango_cairo_update_context(cr, pango_context); */ pango_layout_set_tabs(layout, tab_array); font_desc = pango_font_description_from_string(font); diff --git a/src/rrd_graph.c b/src/rrd_graph.c index ac0f3ea..795a6ac 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -340,7 +340,7 @@ int im_free( if (im->surface) cairo_surface_destroy(im->surface); if (status) - fprintf(stderr, "OOPS: Cairo has issuesm it can't even die: %s\n", + fprintf(stderr, "OOPS: Cairo has issues it can't even die: %s\n", cairo_status_to_string(status)); return 0; @@ -3031,9 +3031,9 @@ int graph_paint( break; }; im->cr = cairo_create(im->surface); - pango_cairo_font_map_set_resolution(PANGO_CAIRO_FONT_MAP(font_map), 100); cairo_set_antialias(im->cr, im->graph_antialias); cairo_scale(im->cr, im->zoom, im->zoom); + pango_cairo_font_map_set_resolution(PANGO_CAIRO_FONT_MAP(font_map), 100); gfx_new_area(im, 0, 0,