>From bbcece451db144d2ea1eef752d99771a89f23f85 Mon Sep 17 00:00:00 2001 From: Paul Chavent Date: Wed, 14 Sep 2011 23:12:29 +0200 Subject: [PATCH 3/3] Set svg font size unit to px. It seems that the default init give a wrong size. This force the unit to be px, which seems to give good results. --- lib/diasvgrenderer.c | 2 +- plug-ins/svg/render_svg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/diasvgrenderer.c b/lib/diasvgrenderer.c index 36861e7..3e965fa 100644 --- a/lib/diasvgrenderer.c +++ b/lib/diasvgrenderer.c @@ -686,7 +686,7 @@ draw_text_line(DiaRenderer *self, TextLine *text_line, style = (char*)get_fill_style(renderer, colour); /* return value must not be freed */ renderer->linewidth = saved_width; - tmp = g_strdup_printf("%s; font-size: %s", style, + tmp = g_strdup_printf("%s; font-size: %spx", style, dia_svg_dtostr(d_buf, text_line_get_height(text_line))); style = tmp; /* This is going to break for non-LTR texts, as SVG thinks 'start' is diff --git a/plug-ins/svg/render_svg.c b/plug-ins/svg/render_svg.c index 003a447..19ee137 100644 --- a/plug-ins/svg/render_svg.c +++ b/plug-ins/svg/render_svg.c @@ -383,7 +383,7 @@ node_set_text_style (xmlNodePtr node, style = g_strconcat(style, ";text-anchor:end", NULL); break; } - tmp = g_strdup_printf("%s;font-size:%s", style, + tmp = g_strdup_printf("%s;font-size:%spx", style, dia_svg_dtostr(d_buf, font_size) ); g_free (style); style = tmp; -- 1.7.4.4