aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r--e-util/e-util.c123
1 files changed, 0 insertions, 123 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 427f479e01..b7dd93aa15 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1204,129 +1204,6 @@ e_ascii_dtostr (gchar *buffer, gint buf_len, const gchar *format, gdouble d)
return buffer;
}
-/* font options cache */
-static gchar *fo_antialiasing = NULL;
-static gchar *fo_hinting = NULL;
-static gchar *fo_subpixel_order = NULL;
-static GStaticMutex fo_lock = G_STATIC_MUTEX_INIT;
-
-static void
-fo_option_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- const gchar *key;
-
- g_static_mutex_lock (&fo_lock);
-
- g_free (fo_antialiasing);
- key = "/desktop/gnome/font_rendering/antialiasing";
- fo_antialiasing = gconf_client_get_string (client, key, NULL);
-
- g_free (fo_hinting);
- key = "/desktop/gnome/font_rendering/hinting";
- fo_hinting = gconf_client_get_string (client, key, NULL);
-
- g_free (fo_subpixel_order);
- key = "/desktop/gnome/font_rendering/rgba_order";
- fo_subpixel_order = gconf_client_get_string (client, key, NULL);
-
- g_static_mutex_unlock (&fo_lock);
-}
-
-cairo_font_options_t *
-get_font_options (void)
-{
- static GConfClient *fo_gconf = NULL;
- cairo_font_options_t *font_options = cairo_font_options_create ();
-
- if (fo_gconf == NULL) {
- const gchar *key;
-
- fo_gconf = gconf_client_get_default ();
-
- key = "/desktop/gnome/font_rendering";
- gconf_client_add_dir (
- fo_gconf, key, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- key = "/desktop/gnome/font_rendering/antialiasing";
- gconf_client_notify_add (
- fo_gconf, key, fo_option_changed, NULL, NULL, NULL);
-
- key = "/desktop/gnome/font_rendering/hinting";
- gconf_client_notify_add (
- fo_gconf, key, fo_option_changed, NULL, NULL, NULL);
-
- key = "/desktop/gnome/font_rendering/rgba_order";
- gconf_client_notify_add (
- fo_gconf, key, fo_option_changed, NULL, NULL, NULL);
-
- fo_option_changed (fo_gconf, 0, NULL, NULL);
- }
-
- g_static_mutex_lock (&fo_lock);
-
- /* Antialiasing */
- if (fo_antialiasing == NULL)
- cairo_font_options_set_antialias (
- font_options, CAIRO_ANTIALIAS_DEFAULT);
- else if (strcmp (fo_antialiasing, "grayscale") == 0)
- cairo_font_options_set_antialias (
- font_options, CAIRO_ANTIALIAS_GRAY);
- else if (strcmp (fo_antialiasing, "rgba") == 0)
- cairo_font_options_set_antialias (
- font_options, CAIRO_ANTIALIAS_SUBPIXEL);
- else if (strcmp (fo_antialiasing, "none") == 0)
- cairo_font_options_set_antialias (
- font_options, CAIRO_ANTIALIAS_NONE);
- else
- cairo_font_options_set_antialias (
- font_options, CAIRO_ANTIALIAS_DEFAULT);
-
- if (fo_hinting == NULL)
- cairo_font_options_set_hint_style (
- font_options, CAIRO_HINT_STYLE_DEFAULT);
- else if (strcmp (fo_hinting, "full") == 0)
- cairo_font_options_set_hint_style (
- font_options, CAIRO_HINT_STYLE_FULL);
- else if (strcmp (fo_hinting, "medium") == 0)
- cairo_font_options_set_hint_style (
- font_options, CAIRO_HINT_STYLE_MEDIUM);
- else if (strcmp (fo_hinting, "slight") == 0)
- cairo_font_options_set_hint_style (
- font_options, CAIRO_HINT_STYLE_SLIGHT);
- else if (strcmp (fo_hinting, "none") == 0)
- cairo_font_options_set_hint_style (
- font_options, CAIRO_HINT_STYLE_NONE);
- else
- cairo_font_options_set_hint_style (
- font_options, CAIRO_HINT_STYLE_DEFAULT);
-
- if (fo_subpixel_order == NULL)
- cairo_font_options_set_subpixel_order (
- font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
- else if (strcmp (fo_subpixel_order, "rgb") == 0)
- cairo_font_options_set_subpixel_order (
- font_options, CAIRO_SUBPIXEL_ORDER_RGB);
- else if (strcmp (fo_subpixel_order, "bgr") == 0)
- cairo_font_options_set_subpixel_order (
- font_options, CAIRO_SUBPIXEL_ORDER_BGR);
- else if (strcmp (fo_subpixel_order, "vrgb") == 0)
- cairo_font_options_set_subpixel_order (
- font_options, CAIRO_SUBPIXEL_ORDER_VRGB);
- else if (strcmp (fo_subpixel_order, "vbgr") == 0)
- cairo_font_options_set_subpixel_order (
- font_options, CAIRO_SUBPIXEL_ORDER_VBGR);
- else
- cairo_font_options_set_subpixel_order (
- font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
-
- g_static_mutex_unlock (&fo_lock);
-
- return font_options;
-}
-
/* Evolution Locks for crash recovery */
static const gchar *