[epiphany/gnome-3-0] 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/gnome-3-0] ephy-embed-prefs: stop trying to use the GNOME font settings
- Date: Sat, 25 Jun 2011 01:35:30 +0000 (UTC)
commit 43c9c643e843ec9948f4a5427cc44eb926e780ac
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 3b035ab..0f4f659 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -357,19 +357,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;
@@ -383,10 +377,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");
}
@@ -394,28 +386,6 @@ webkit_pref_callback_gnome_fonts (GSettings *ephy_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]