[dia] Bug 637047 - SVG font name is sans-serif, not sanserif
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Bug 637047 - SVG font name is sans-serif, not sanserif
- Date: Sun, 2 Jan 2011 18:26:04 +0000 (UTC)
commit b1fd5a88d30b1c2d8ead5084e05a8082ecab5478
Author: Hans Breuer <hans breuer org>
Date: Sat Dec 11 22:13:06 2010 +0100
Bug 637047 - SVG font name is sans-serif, not sanserif
Tested with render-test the font name change indeed makes the
Dia "sans" fonts appear w/o serifs. There is still something
wrong with the font size, but that seems independent.
To make compatibility with old and new (shape-)files both
"sanserif" and "sans-serif" are translated to the internal
"sans".
lib/dia_svg.c | 2 +-
plug-ins/svg/render_svg.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/dia_svg.c b/lib/dia_svg.c
index 0e69ef3..0d1461d 100644
--- a/lib/dia_svg.c
+++ b/lib/dia_svg.c
@@ -172,7 +172,7 @@ dia_svg_parse_style(xmlNodePtr node, DiaSvgStyle *s, real user_scale)
temp[i] = '\0';
if (!over) {
- if (strcmp (temp, "sanserif") == 0)
+ if (strcmp (temp, "sanserif") == 0 || strcmp (temp, "sans-serif") == 0)
family = g_strdup ("sans"); /* special name adaption */
else
family = g_strdup(temp);
diff --git a/plug-ins/svg/render_svg.c b/plug-ins/svg/render_svg.c
index 4229778..744b048 100644
--- a/plug-ins/svg/render_svg.c
+++ b/plug-ins/svg/render_svg.c
@@ -391,7 +391,7 @@ node_set_text_style (xmlNodePtr node,
if (font) {
tmp = g_strdup_printf("%s;font-family:%s;font-style:%s;"
"font-weight:%s",style,
- strcmp(family, "sans") == 0 ? "sanserif" : family,
+ strcmp(family, "sans") == 0 ? "sans-serif" : family,
dia_font_get_slant_string(font),
dia_font_get_weight_string(font));
g_free(style);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]