summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2012-05-21 13:33:00 +0000
committertavmjong-free <tavmjong@free.fr>2012-05-21 13:33:00 +0000
commitdb0f8faa3ba62d0c60d5a6c5cc0dec479eb79021 (patch)
tree73af93131adea94e7cf45b004f889c1bed2d61f1 /src/libnrtype
parentGTK+ 3 changes for cell-renderers (diff)
downloadinkscape-db0f8faa3ba62d0c60d5a6c5cc0dec479eb79021.tar.gz
inkscape-db0f8faa3ba62d0c60d5a6c5cc0dec479eb79021.zip
Change default font to a CSS valid default font (Sans -> sans-serif).
(bzr r11393)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.cpp8
-rw-r--r--src/libnrtype/Layout-TNG-Input.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 63f9bd6b0..8de9d4795 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -929,9 +929,9 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail)
res = NULL;
if ( canFail ) {
char *tc = pango_font_description_to_string(descr);
- PANGO_DEBUG("falling back from %s to Sans because InstallFace failed\n",tc);
+ PANGO_DEBUG("falling back from %s to 'sans-serif' because InstallFace failed\n",tc);
g_free(tc);
- pango_font_description_set_family(descr,"Sans");
+ pango_font_description_set_family(descr,"sans-serif");
res = Face(descr,false);
}
} else {
@@ -942,9 +942,9 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail)
} else {
// no match
if ( canFail ) {
- PANGO_DEBUG("falling back to Sans\n");
+ PANGO_DEBUG("falling back to 'sans-serif'\n");
descr = pango_font_description_new();
- pango_font_description_set_family(descr,"Sans");
+ pango_font_description_set_family(descr,"sans-serif");
res = Face(descr,false);
pango_font_description_free(descr);
}
diff --git a/src/libnrtype/Layout-TNG-Input.cpp b/src/libnrtype/Layout-TNG-Input.cpp
index c5ea3969d..07bf207c8 100644
--- a/src/libnrtype/Layout-TNG-Input.cpp
+++ b/src/libnrtype/Layout-TNG-Input.cpp
@@ -291,7 +291,7 @@ PangoFontDescription *Layout::InputStreamTextSource::styleGetFontDescription() c
// pango, so it's not the limiting factor
Glib::ustring family;
if (style->text->font_family.value == NULL) {
- family = "Sans";
+ family = "sans-serif";
} else {
gchar **families = g_strsplit(style->text->font_family.value, ",", -1);
if (families) {