diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2012-05-21 13:33:00 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2012-05-21 13:33:00 +0000 |
| commit | db0f8faa3ba62d0c60d5a6c5cc0dec479eb79021 (patch) | |
| tree | 73af93131adea94e7cf45b004f889c1bed2d61f1 /src | |
| parent | GTK+ 3 changes for cell-renderers (diff) | |
| download | inkscape-db0f8faa3ba62d0c60d5a6c5cc0dec479eb79021.tar.gz inkscape-db0f8faa3ba62d0c60d5a6c5cc0dec479eb79021.zip | |
Change default font to a CSS valid default font (Sans -> sans-serif).
(bzr r11393)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 8 | ||||
| -rw-r--r-- | src/libnrtype/Layout-TNG-Input.cpp | 2 | ||||
| -rw-r--r-- | src/preferences-skeleton.h | 2 | ||||
| -rw-r--r-- | src/style.cpp | 6 |
4 files changed, 9 insertions, 9 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) { diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index 8935d7ace..85c895dcb 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -115,7 +115,7 @@ static char const preferences_skeleton[] = " <eventcontext id=\"text\" usecurrent=\"0\" gradientdrag=\"1\"\n" " font_sample=\"AaBbCcIiPpQq12369$\342\202\254\302\242?.;/()\"\n" " show_sample_in_list=\"1\"\n" -" style=\"fill:black;fill-opacity:1;stroke:none;font-family:Sans;font-style:normal;font-weight:normal;font-size:40px;\" selcue=\"1\"/>\n" +" style=\"fill:black;fill-opacity:1;stroke:none;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;\" selcue=\"1\"/>\n" " <eventcontext id=\"nodes\" selcue=\"1\" gradientdrag=\"1\" highlight_color=\"4278190335\" pathflash_enabled=\"1\" pathflash_unselected=\"0\" pathflash_timeout=\"500\" show_handles=\"1\" show_outline=\"0\" sculpting_profile=\"1\" single_node_transform_handles=\"0\" show_transform_handles=\"0\" live_outline=\"1\" live_objects=\"1\" show_helperpath=\"0\" x=\"0\" y=\"0\" edit_clipping_paths=\"0\" edit_masks=\"0\" />\n" " <eventcontext id=\"tweak\" selcue=\"0\" gradientdrag=\"0\" show_handles=\"0\" width=\"0.2\" force=\"0.2\" fidelity=\"0.5\" usepressure=\"1\" style=\"fill:red;stroke:none;\" usecurrent=\"0\"/>\n" " <eventcontext id=\"spray\" selcue=\"1\" gradientdrag=\"0\" usepressure=\"1\" width=\"15\" population=\"70\" mode=\"1\" rotation_variation=\"0\" scale_variation=\"0\" standard_deviation=\"70\" mean=\"0\"/>\n" diff --git a/src/style.cpp b/src/style.cpp index 40cd1663e..a67852e11 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -3100,9 +3100,9 @@ sp_text_style_new() ts->refcount = 1; sp_text_style_clear(ts); - ts->font_specification.value = g_strdup("Sans"); - ts->font.value = g_strdup("Sans"); - ts->font_family.value = g_strdup("Sans"); + ts->font_specification.value = g_strdup("sans-serif"); + ts->font.value = g_strdup("sans-serif"); + ts->font_family.value = g_strdup("sans-serif"); return ts; } |
