[epiphany] ephy-embed-prefs: stop trying to use the GNOME font settings
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-embed-prefs: stop trying to use the GNOME font settings
- Date: Fri, 17 Jun 2011 20:13:53 +0000 (UTC)
commit 1d5285f6b01bdab426c96dea26ec4c71d25f1f4e
Author: Xan Lopez <xlopez igalia com>
Date: Fri Jun 17 22:08:23 2011 +0200
ephy-embed-prefs: stop trying to use the GNOME font settings
They are particularly ill-suited for us in GNOME 3:
- font-name is Cantarell, which is not good as the sans-serif font in
the web.
- document-font-name, which we hoped would be a serif font, is "Sans
11".
So just give up and set "sans" "serif" and use whatever the system is
set up to do for that. In Fedora we will get DejaVu, which is not
particularly great, so ideally we should add code to get better
defaults.
embed/ephy-embed-prefs.c | 44 +++++++-------------------------------------
1 files changed, 7 insertions(+), 37 deletions(-)
---
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index ae6cec2..c1bbc23 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -358,19 +358,13 @@ webkit_pref_callback_gnome_fonts (GSettings *ephy_settings,
GSettings *settings;
if (g_settings_get_boolean (ephy_settings, key)) {
- settings = ephy_settings_get ("org.gnome.desktop.interface");
-
- webkit_pref_callback_font_size (settings, "document-font-name",
- "default-font-size");
- webkit_pref_callback_font_size (settings, "monospace-font-name",
- "default-monospace-font-size");
-
- webkit_pref_callback_font_family (settings, "document-font-name",
- "default-font-family");
- webkit_pref_callback_font_family (settings, "font-name",
- "sans-serif-font-family");
- webkit_pref_callback_font_family (settings, "monospace-font-name",
- "monospace-font-family");
+ g_object_set (webkit_settings,
+ "default-font-family", "serif",
+ "sans-serif-font-family", "sans-serif",
+ "monospace-font-family", "monospace",
+ "default-font-size", 12,
+ "default-monospace-font-size", 10,
+ NULL);
} else {
/* Sync with Epiphany values */
settings = ephy_settings;
@@ -384,10 +378,8 @@ webkit_pref_callback_gnome_fonts (GSettings *ephy_settings,
"default-font-family");
webkit_pref_callback_font_family (settings, EPHY_PREFS_WEB_SANS_SERIF_FONT,
"sans-serif-font-family");
-
webkit_pref_callback_font_family (settings, EPHY_PREFS_WEB_MONOSPACE_FONT,
"monospace-font-family");
-
webkit_pref_callback_font_family (settings, EPHY_PREFS_WEB_SERIF_FONT,
"serif-font-family");
}
@@ -419,28 +411,6 @@ webkit_pref_callback_enable_spell_checking (GSettings *settings,
static const PrefData webkit_pref_entries[] =
{
- /* GNOME font settings */
- { "org.gnome.desktop.interface",
- "document-font-name",
- "default-font-size",
- webkit_pref_callback_font_size },
- { "org.gnome.desktop.interface",
- "monospace-font-name",
- "default-monospace-font-size",
- webkit_pref_callback_font_size },
- { "org.gnome.desktop.interface",
- "document-font-name",
- "default-font-family",
- webkit_pref_callback_font_family },
- { "org.gnome.desktop.interface",
- "font-name",
- "sans-serif-font-family",
- webkit_pref_callback_font_family },
- { "org.gnome.desktop.interface",
- "monospace-font-name",
- "monospace-font-family",
- webkit_pref_callback_font_family },
-
/* Epiphany font settings */
{ EPHY_PREFS_WEB_SCHEMA,
EPHY_PREFS_WEB_SERIF_FONT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]