aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-prefs.c
diff options
context:
space:
mode:
authorXan Lopez <xlopez@igalia.com>2011-06-18 04:08:23 +0800
committerXan Lopez <xlopez@igalia.com>2011-06-18 04:12:55 +0800
commit1d5285f6b01bdab426c96dea26ec4c71d25f1f4e (patch)
treeca51fe1959e2aaea86f0edfb0adcc617a7c90a27 /embed/ephy-embed-prefs.c
parent1d8bceeea2064fc777336c3f5af15e3f3ac490c5 (diff)
downloadgsoc2013-epiphany-1d5285f6b01bdab426c96dea26ec4c71d25f1f4e.tar
gsoc2013-epiphany-1d5285f6b01bdab426c96dea26ec4c71d25f1f4e.tar.gz
gsoc2013-epiphany-1d5285f6b01bdab426c96dea26ec4c71d25f1f4e.tar.bz2
gsoc2013-epiphany-1d5285f6b01bdab426c96dea26ec4c71d25f1f4e.tar.lz
gsoc2013-epiphany-1d5285f6b01bdab426c96dea26ec4c71d25f1f4e.tar.xz
gsoc2013-epiphany-1d5285f6b01bdab426c96dea26ec4c71d25f1f4e.tar.zst
gsoc2013-epiphany-1d5285f6b01bdab426c96dea26ec4c71d25f1f4e.zip
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.
Diffstat (limited to 'embed/ephy-embed-prefs.c')
-rw-r--r--embed/ephy-embed-prefs.c44
1 files changed, 7 insertions, 37 deletions
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index ae6cec20f..c1bbc23d4 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,