From db0f8faa3ba62d0c60d5a6c5cc0dec479eb79021 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 21 May 2012 15:33:00 +0200 Subject: Change default font to a CSS valid default font (Sans -> sans-serif). (bzr r11393) --- src/libnrtype/FontFactory.cpp | 8 ++++---- src/libnrtype/Layout-TNG-Input.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libnrtype') 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) { -- cgit v1.2.3